From 4fe8bd3fad44d0cbf72f717dc4e16ff4dd6d6730 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Tue, 9 Dec 2025 15:58:48 +0100 Subject: [PATCH] ingest ParseError: don't raise a 500; make this the SDK's problem (400) 500 was just fine when I was still calibrating the envelope parsing, but AFAICT it's correct now, so I'd rather not get notified about 'remaining problems' (which are SDK problems) --- ingest/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ingest/views.py b/ingest/views.py index 09db26e..982a301 100644 --- a/ingest/views.py +++ b/ingest/views.py @@ -118,6 +118,8 @@ class BaseIngestAPIView(View): return self._set_cors_headers(JsonResponse({"message": str(e)}, status=HTTP_413_CONTENT_TOO_LARGE)) except ValidationError as e: return self._set_cors_headers(JsonResponse({"message": str(e)}, status=HTTP_400_BAD_REQUEST)) + except ParseError as e: + return self._set_cors_headers(JsonResponse({"message": str(e)}, status=HTTP_400_BAD_REQUEST)) @classmethod def get_sentry_key_for_request(cls, request):