Skip to content

Fix API response when size limit is exceeded - #251

Merged
chosak merged 2 commits into
mainfrom
fix/export-limit
Jul 24, 2026
Merged

Fix API response when size limit is exceeded#251
chosak merged 2 commits into
mainfrom
fix/export-limit

Conversation

@chosak

@chosak chosak commented Jul 24, 2026

Copy link
Copy Markdown
Member

#249 introduced a bug - it should have raised a 404 error but instead returns the Http404 Python class, which triggers a 500 error to the user.

This commit changes the logic to be consistent with other API validation errors, using the DRF ValidationError class. These trigger a 400 HTTP Bad Request response to the user.

I've also slightly improved error logging generally to make it easier to debug API errors.

chosak added 2 commits July 22, 2026 14:39
The current code has a bug - it should have raised a 404 error but
instead returns the Http404 Python class, which triggers a 500 error to
the user.

This commit changes the logic to be consistent with other API validation
errors, using the DRF ValidationError class. These trigger a 400 HTTP
Bad Request response to the user.
Provide additional exception details when logging errors.
@chosak
chosak merged commit 0938dff into main Jul 24, 2026
2 checks passed
@chosak
chosak deleted the fix/export-limit branch July 24, 2026 16:37
@higs4281

Copy link
Copy Markdown
Member

Been occupied; thank you.

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.

3 participants