You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the current behavior?
In v3, both intentionally raised exceptions and unexpected exceptions are swallowed entirely without any indication in the console. They only return any information at all in the response, which of course doesn't include the stack trace. Even in Debug mode.
What is the expected behavior?
Exceptions should be logged as normal to the console, with a stack trace. Except perhaps explicit GraphQLError exceptions.
What is the motivation / use case for changing the behavior?
Logging exceptions with stack traces to find and fix errors is absolutely critical for hopefully obvious reasons.
Please tell us about your environment:
Django 3.2.20
Graphene-Django 3.1.3
Graphene 3.3
For comparison (this version set produces exceptions in the console)
Django 3.2.20
Graphene-Django 2.16.0
Graphene 2.1.9
Logging and visibility for stack traces is necessary for both development and production code in order to answer simple questions like "Where is the code that broke?" I'm migrating a project from Graphene-Django v2 to v3 and am encountering an issue regarding exception swallowing. In v2, both explicit Exceptions and unexpected Exceptions will log to the console with stack traces and also return the error message in the GraphQL response. In v3, the same exact code with no changes at all besides the version upgrade won't log anything to the console, but will return the error message in the GraphQL response. I would expect to get the exception and stack trace in the console as well.
Or is there some new option to log exceptions that is now disabled by default that I might have missed?
Thanks!
Edit:
Bug still present on Graphene-Django 3.2.0
The text was updated successfully, but these errors were encountered:
What is the current behavior?
In v3, both intentionally raised exceptions and unexpected exceptions are swallowed entirely without any indication in the console. They only return any information at all in the response, which of course doesn't include the stack trace. Even in Debug mode.
Code example
Based on one of the graphene-django examples, set up as normal and try the 3 queries in the readme:
https://github.com/Toruitas/Graphene-Django-BR
What is the expected behavior?
Exceptions should be logged as normal to the console, with a stack trace. Except perhaps explicit GraphQLError exceptions.
What is the motivation / use case for changing the behavior?
Logging exceptions with stack traces to find and fix errors is absolutely critical for hopefully obvious reasons.
Please tell us about your environment:
Django 3.2.20
Graphene-Django 3.1.3
Graphene 3.3
For comparison (this version set produces exceptions in the console)
Django 3.2.20
Graphene-Django 2.16.0
Graphene 2.1.9
Logging and visibility for stack traces is necessary for both development and production code in order to answer simple questions like "Where is the code that broke?" I'm migrating a project from Graphene-Django v2 to v3 and am encountering an issue regarding exception swallowing. In v2, both explicit Exceptions and unexpected Exceptions will log to the console with stack traces and also return the error message in the GraphQL response. In v3, the same exact code with no changes at all besides the version upgrade won't log anything to the console, but will return the error message in the GraphQL response. I would expect to get the exception and stack trace in the console as well.
Or is there some new option to log exceptions that is now disabled by default that I might have missed?
Thanks!
Edit:
Bug still present on Graphene-Django 3.2.0
The text was updated successfully, but these errors were encountered: