Skip to content

Commit 1de69e5

Browse files
committed
Add right stack trace to exception
1 parent c93143a commit 1de69e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graphql/execution/executor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import collections
22
import functools
33
import logging
4+
import sys
45

56
from promise import Promise, is_thenable, promise_for_dict, promisify
67

@@ -170,6 +171,7 @@ def resolve_or_error(resolve_fn, source, args, context, info, executor):
170171
logger.exception("An error occurred while resolving field {}.{}".format(
171172
info.parent_type.name, info.field_name
172173
))
174+
e.stack = sys.exc_info()[2]
173175
return e
174176

175177

0 commit comments

Comments
 (0)