Skip to content

Exceptions in resolver are caught (no traceback) #23

Closed
@ceelian

Description

@ceelian

Version:
GraphQL-core-next 1.0.1
Python 3.7.1

Current Behaviour:

Exceptions in resolvers are caught by default and the traceback of the original_error doesn't help debugging.

Traceback output of log.exception('', exc_info=result.errors[0].original_error)

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/graphql/execution/execute.py", line 664, in complete_value_catching_error
    return_type, field_nodes, info, path, result
  File "/usr/local/lib/python3.6/site-packages/graphql/execution/execute.py", line 731, in complete_value
    raise result
graphql.error.graphql_error.GraphQLError: My exception

Expected Behaviour:

  1. There is a flag raise_exception which switches if exceptions are caught or if they are raised out of the library resolver.

  2. The traceback of the original_errors is meaningful: leads to the source line where the exception occurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions