Skip to content

Use DRF handlers for 400 and 500 status codes#21

Draft
tomneep wants to merge 1 commit intoCLIMB-TRE:mainfrom
tomneep:drf-handlers
Draft

Use DRF handlers for 400 and 500 status codes#21
tomneep wants to merge 1 commit intoCLIMB-TRE:mainfrom
tomneep:drf-handlers

Conversation

@tomneep
Copy link
Collaborator

@tomneep tomneep commented Feb 25, 2026

Uses DRFs generic error views for status codes 400 and 500. I'm not really sure how to test this in CI but I can run locally and use curl to hit a badly configured server.

Without this I get

A server error occurred.  Please contact the administrator.

with this I get

{"error": "Server Error (500)"}

which for an API seems more appropriate (hopefully we aren't getting these errors though!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant