enhancement: DjangoDebugContext captures exceptions#1122
Conversation
…ed stack traces to be queried
tcleonard
left a comment
There was a problem hiding this comment.
Awesome! Was looking for that for a while!
Just saw that comment... not sure why next does not return a promise in the first place, but what is the implication of this? |
|
Could mean an exception might get raised and not logged. Or maybe the variable name is incorrect. My current understanding is it gets call by this: https://github.com/graphql-python/graphql-core/blob/6494c7fcfa62418a4fe36cf23e0bbfebc10fe342/src/graphql/execution/middleware.py#L36 which doesn't seem to do anything with promises... |
|
The try-except around If the try-except could be removed, that would make graphene-django work more as people might expect, i think. |
DjangoDebugContext captures exceptions and allows captured stack traces to be queried. Example usage added to documentation.
Fixes #1121
Discovered that
nextdoes not return a promise in our test environment. Do I need to check if the return is a promise?