From 9b47f87a3712c76ab4182f14a6fb39a57cf00ee3 Mon Sep 17 00:00:00 2001 From: "Thomas Neep (Advanced Research Computing)" Date: Wed, 25 Feb 2026 13:37:01 +0000 Subject: [PATCH] Use DRF handlers for 400 and 500 status codes --- agate/core/urls.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agate/core/urls.py b/agate/core/urls.py index 967d4d0..5fd3c19 100644 --- a/agate/core/urls.py +++ b/agate/core/urls.py @@ -10,3 +10,6 @@ path("admin/", admin.site.urls), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + +handler400 = 'rest_framework.exceptions.bad_request' +handler500 = 'rest_framework.exceptions.server_error'