Bad error reporting on create type
See original GitHub issueCREATE TYPE MyStr EXTENDING str;
ERROR: InternalServerError: 'NoneType' object has no attribute 'is_schema_field'
Version 1.0-alpha.2+dev.391.g2276144b
I obviously needed CREATE SCALAR TYPE
and would expect it to be grammar error (i.e. something like TYPE is unexpected, expected one of SCALAR, DATABASE, ...
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to Report Errors in Forms: 10 Design Guidelines
How to Report Errors in Forms: 10 Design Guidelines · 1. Aim for Inline Validation Whenever Possible · 2. Indicate Successful Entry for...
Read more >Error Messages: Examples, Best Practices & Common Mistakes
1. Write for humans (be understandable) · 2. Make sure the message is helpful · 3. Use a touch of humor · 4....
Read more >Error handling - Apollo GraphQL Docs
Built-in error codes ; GRAPHQL_VALIDATION_FAILED. The GraphQL operation is not valid against the server's schema. ; BAD_USER_INPUT. The GraphQL operation includes ...
Read more >PHP error reporting
Due to various historical reasons, there are thousands of bad practices in the area of error handling and reporting. As a result, the...
Read more >The Art of the Error Message. How to write clear, helpful copy ...
When developers and designers craft clear, helpful error messages for an app, it keeps users ... How to write clear, helpful copy for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
CREATE TYPE
is valid syntax and is used to define object types. The crash in this case is caused by the fact that you’re trying to create an object type that inherits from a scalar type. There has to be a check to prevent mixing schema object classes like that. Here and here are good spots to place the checks in (checkbases
).It looks like we produce an error message now (instead of an ISE), but not a good one:
ERROR: InvalidReferenceError: schema object UUID('00000000-0000-0000-0000-000000000101') exists, but is a 'scalar type' not a 'object type'
We can do better