georchestra / georchestra-gateway

GNU General Public License v3.0
0 stars 5 forks source link

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

Closed groldan closed 3 months ago

groldan commented 3 months ago

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.