feat(messaging): also capture errors from 'handle' that result in HTTP 400

pull/1/head
Luca 8 months ago
parent af59a6d393
commit 908c3d21cc

@ -47,7 +47,8 @@ def handle_inbound(request):
try: try:
incoming_message.send(receiver, messages=receiver.handle(**kwargs)) incoming_message.send(receiver, messages=receiver.handle(**kwargs))
except (IndexError, KeyError, ValueError): except (IndexError, KeyError, ValueError) as e:
sentry_sdk.capture_exception(e)
return HttpResponseBadRequest() return HttpResponseBadRequest()
except Exception as e: except Exception as e:
sentry_sdk.capture_exception(e) sentry_sdk.capture_exception(e)

Loading…
Cancel
Save