Refactor Sentry Middleware for Graphene
This commit is contained in:
parent
4e7dceb8c3
commit
954ed9027d
|
|
@ -120,4 +120,10 @@ class SentryMiddleware(object):
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
def resolve(self, next, root, info: ResolveInfo, **args):
|
def resolve(self, next, root, info: ResolveInfo, **args):
|
||||||
return next(root, info, **args).catch(self.on_error)
|
try:
|
||||||
|
return next(root, info, **args)
|
||||||
|
except Exception as e:
|
||||||
|
capture_exception(e)
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue