-
Notifications
You must be signed in to change notification settings - Fork 202
Description
After release 4.1 the module has the following error handling behavior:
https://webonyx.github.io/graphql-php/error-handling/#default-error-formatting
As of version 0.10.0, all exceptions thrown in resolvers are reported with generic message "Internal server error". This is done to avoid information leak in production environments (e.g. database connection errors, file access errors, etc).
Now the following scenario is possible:
- an exception is thrown from a resolver
- client receives "Internal server error" message
- nobody have a clue what exactly happened because the original error message is lost
Adding original error messages to Drupal log would help a lot with debugging.
Also, as a developer, I would like the log record to contain maximum debug info, e.g. GraphQL query, variables, Drupal user, etc. But I'm not sure here because GraphQL requests can potentially contain private user data.
And of course it can be a config option.