2
0
Fork 0

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

This commit is contained in:
Luca 2024-05-10 09:46:38 +02:00
parent af59a6d393
commit 908c3d21cc
1 changed files with 2 additions and 1 deletions

View File

@ -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)