Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion graphql/error/located_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, nodes, original_error=None):
else:
message = 'An unknown error occurred.'

if isinstance(original_error, GraphQLError):
if hasattr(original_error, 'stack'):
stack = original_error.stack
else:
stack = sys.exc_info()[2]
Expand Down
2 changes: 2 additions & 0 deletions graphql/execution/executor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import collections
import functools
import logging
import sys

from promise import Promise, is_thenable, promise_for_dict, promisify

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


Expand Down