Development and production error messages
See original GitHub issueWhen a query in an added field fails, EntityGraphQL helpfully provides a GraphQL response that contains the error. However, the error message sometimes doesn’t contain the message from the inner exception. For example, if Entity Framework Core is confirmed to throw on warnings in OnConfiguring
, like this
optionsBuilder.ConfigureWarnings(b => b.Default(WarningBehavior.Throw));
EntityGraphQL doesn’t show the actual error. For example, for a warning about client-side execution being required, the output is just:
{
"errors": [
{
"message": "Field 'customers' - Exception has been thrown by the target of an invocation."
}
]
}
In development (per IWebHostEnvironment
), the underlying cause should be shown. Conversely, for security in production, the error should show the same message that an ASP.NET Core API controller shows in production, with the exception message not provided.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Error Handling: Making Production Ready Code
This is why standardized error messages are necessary to implement if you want your application to be production ready.
Read more >General error handling rules | Technical Writing
Before we get to the fun part of the course—wording error messages—let's discuss a few general error handling rules.
Read more >Error Messages: Examples, Best Practices & Common ...
4 common mistakes with error messages · 1. Ambiguity · 2. Condescending language/blaming the user · 3. Poor placement of error messages ·...
Read more >Fixing what's broken: How to improve your in-product error ...
Error messages are the backbone of any product. They provide guidance, communicate the outcome of an action, and help users troubleshoot.
Read more >Error-Message Guidelines
Design effective error messages by ensuring they are highly visible, provide constructive communication, and respect user effort.
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
One approach would be a property on
SchemaProvider
:#262 introduces the ability to control this