From 908c3d21cc5f5cefa09ba94ef975a7f576d5ec1d Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 10 May 2024 09:46:38 +0200 Subject: [PATCH] feat(messaging): also capture errors from 'handle' that result in HTTP 400 --- shiftregister/messaging/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shiftregister/messaging/views.py b/shiftregister/messaging/views.py index 22f5e3e..ffe6de8 100644 --- a/shiftregister/messaging/views.py +++ b/shiftregister/messaging/views.py @@ -47,7 +47,8 @@ def handle_inbound(request): try: 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() except Exception as e: sentry_sdk.capture_exception(e)