-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
When an unhandled exception occurs and the ErrorPageFilter
forwards to the error page, the status of the actual response is 200
instead of 500
. response.reset()
is called and then response.sendError()
but the ErrorWrapperResponse
overrides sendError()
and so the actual response status is still 200
. The handleErrorStatus()
method calls response.setStatus()
with the error status but forwardToErrorPage()
does not. So when an ajax call is made for example and an unhandled exception occurs, my ajax success handler is being invoked instead of my ajax error handler since the response status is 200
(OK). When running with the Spring boot plugin and the tomcat embedded container, the response status returned is 500
. Should the forwardToErrorPage()
method be updated to also call response.setStatus(500)
?