Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display custom page on 413 errors #3121

Merged
merged 1 commit into from
Dec 9, 2023
Merged

Conversation

hughrun
Copy link
Contributor

@hughrun hughrun commented Nov 18, 2023

When a RequestDataTooBig exception is thrown, users are largely in the dark about what happened and how it can be fixed. This PR resolves this by inserting middleware to redirect the request to a custom 413 error page.

This exception is thrown when DATA_UPLOAD_MAX_MEMORY_SIZE is exceeded. The default value is 2.5MB, but admins can set any value (in bytes).

Fixes #2340
Fixes #2633

Somewhat addresses #2914

When a RequestDataTooBig exception is thrown, users are largely in the dark about what happened and how it can be fixed.
This commit resolves this by inserting middleware to redirect the request to a custom 413 error page.

This exception is thrown when DATA_UPLOAD_MAX_MEMORY_SIZE is exceeded. The default value is 2.5MB.

Fixes bookwyrm-social#2340
Fixes bookwyrm-social#2633
@mouse-reeve mouse-reeve merged commit 198c003 into bookwyrm-social:main Dec 9, 2023
@hughrun hughrun deleted the 413 branch January 14, 2024 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants