Skip to content

Commit

Permalink
Don't log traceback for explicit error response from mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
ods committed Dec 2, 2019
1 parent 452f648 commit a4afaeb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions graphql/execution/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,13 @@ def resolve_or_error(
try:
return executor.execute(resolve_fn, source, info, **args)
except Exception as e:
logger.exception(
"An error occurred while resolving field {}.{}".format(
info.parent_type.name, info.field_name
if not isinstance(e, GraphQLError):
logger.exception(
"An error occurred while resolving field {}.{}".format(
info.parent_type.name, info.field_name
)
)
)
e.stack = sys.exc_info()[2] # type: ignore
e.stack = sys.exc_info()[2] # type: ignore
return e


Expand Down

0 comments on commit a4afaeb

Please sign in to comment.