Skip to content

Commit 49d5a57

Browse files
committed
Merge branch 'master' of github.com:graphql-python/graphql-core
2 parents 3258d29 + 4fa5435 commit 49d5a57

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

graphql/error/located_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self, nodes, original_error=None):
1313
else:
1414
message = 'An unknown error occurred.'
1515

16-
if isinstance(original_error, GraphQLError):
16+
if hasattr(original_error, 'stack'):
1717
stack = original_error.stack
1818
else:
1919
stack = sys.exc_info()[2]

graphql/execution/executor.py

Lines changed: 3 additions & 1 deletion
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

@@ -50,7 +51,7 @@ def on_resolve(data):
5051

5152
p = Promise(executor).catch(on_rejected).then(on_resolve)
5253
context.executor.wait_until_finished()
53-
return p.value
54+
return p.get()
5455

5556

5657
def execute_operation(exe_context, operation, root_value):
@@ -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)