See gh-31104
This commit is contained in:
Brian Clozel
2023-08-29 16:50:07 +02:00
parent 1d7cbfa415
commit 9133e61687
2 changed files with 72 additions and 102 deletions

View File

@@ -399,16 +399,11 @@ public class ExceptionHandlerExceptionResolver extends AbstractHandlerMethodExce
exceptionHandlerMethod.setHandlerMethodReturnValueHandlers(this.returnValueHandlers);
}
// attempt to reset the response, as maybe a partial successful response is being written.
if (!response.isCommitted()) {
response.reset();
}
ServletWebRequest webRequest = new ServletWebRequest(request, response);
ModelAndViewContainer mavContainer = new ModelAndViewContainer();
ArrayList<Throwable> exceptions = new ArrayList<>();
try {
response.reset();
if (logger.isDebugEnabled()) {
logger.debug("Using @ExceptionHandler " + exceptionHandlerMethod);
}