Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when forgetting name field of Entity or EntityOrCommon in schema JSON syntax #1094

Closed
2 tasks
cdisselkoen opened this issue Jul 25, 2024 · 0 comments · Fixed by #1121
Closed
2 tasks
Labels
backlog We hope to work on this in the future papercut

Comments

@cdisselkoen
Copy link
Contributor

Category

Error message improvements

Describe the feature you'd like to request

In the schema JSON syntax, if you write { "type": "Entity" } or { "type": "EntityOrCommon" } without a "name" key, this is legal and refers to a common type named Entity or EntityOrCommon respectively. Accordingly, the current error message is

failed to resolve type: Entity
help: `Entity` has not been declared as a common type

While technically correct, this message is not as helpful as it could be; a better help message would suggest that the user needs to add a "name" key. For instance, { "type": "Entity", "name": "User" }.

Describe alternatives you've considered

N/A

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@cdisselkoen cdisselkoen added pending-triage Hasn't been triaged yet feature-request Request for a new feature labels Jul 25, 2024
@khieta khieta added backlog We hope to work on this in the future papercut and removed pending-triage Hasn't been triaged yet feature-request Request for a new feature labels Aug 7, 2024
@cdisselkoen cdisselkoen mentioned this issue Aug 8, 2024
3 tasks
@cdisselkoen cdisselkoen linked a pull request Aug 8, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to work on this in the future papercut
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants