GraphQL-python-archive / graphql-django-view

[DEPRECATED | Use graphene-django package] A django view that will execute a GraphQLSchema using a given Executor.
http://graphene-python.org/
MIT License
23 stars 7 forks source link

Uncaught errors can not be easily logged #4

Open chrisportela opened 8 years ago

chrisportela commented 8 years ago

Either using django's logger or through some hook there needs to be a way that things like sentry can know about these uncaught exceptions.

Issue is primarily in graphql_django_view/__init__.py in dispatch() of GraphQLView

except HttpError as e:
            response = e.response
            response['Content-Type'] = 'application/json'
            response.content = self.json_encode(request, {
                'errors': [self.format_error(e)]
            })
            return response
jhgg commented 8 years ago

Working on this in graphql-core.

https://github.com/graphql-python/graphql-core/issues/41

Planning to have that done by new years.

On Dec 23, 2015, at 8:30 AM, Chris Portela notifications@github.com wrote:

Either using django's logger or through some hook there needs to be a way that things like sentry can know about these uncaught exceptions.

Issue is primarily in graphql_django_view/init.py in dispatch() of GraphQLView

except HttpError as e: response = e.response response['Content-Type'] = 'application/json' response.content = self.json_encode(request, { 'errors': [self.format_error(e)] }) return response — Reply to this email directly or view it on GitHub.

rattrayalex commented 8 years ago

In https://github.com/graphql-python/graphql-core/issues/41#issuecomment-216753190 @syrusakbary claims this was fixed. Should this issue be closed?