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

Fix truncated response body when catching application errors to display standardized error page #124

Merged
merged 1 commit into from
May 28, 2024

Conversation

groldan
Copy link
Member

@groldan groldan commented May 28, 2024

Throwing the ResponseStatusException too late during the request processing causes the response body to be partially committed and not displaying the customized error page.

Use a ServerHttpResponseDecorator that throws the exception as soon as its setStatusCode() method is called.

…ay standardized error page

Throwing the `ResponseStatusException` too late during the request
processing causes the response body to be partially committed and not
displaying the customized error page.

Use a `ServerHttpResponseDecorator` that throws the exception as soon as
its `setStatusCode()` method is called.
@groldan groldan merged commit 04f5aa2 into main May 28, 2024
3 checks passed
@groldan groldan deleted the catch_service_errors branch May 28, 2024 01:46
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