You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"IllegalStateException: Cannot call sendError() after the response has been committed" when IOException is thrown during resolving method argument values on Tomcat >= 10.1.16 #32206
Starting from Tomcat 10.1.16 (because of this commit) the exception handler inside InputBuffer#realReadBytes runs response.sendError(400), making the httpServletResponse.isCommitted() return true starting from this point.
To resolve the issue, DefaultHandlerExceptionResolver#handleHttpMessageNotReadable could run response.sendError conditionally, only if !response.isCommitted(), similarly as done in DefaultHandlerExceptionResolver#handleErrorResponse:514.