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
Because of this, populating the fields in the org.springframework.web.ErrorResponse#updateAndGetBody method (that called from org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler#handleExceptionInternal) has no effect.
Reproduction:
enable a rfc7807 handler: spring.mvc.problemdetails.enabled: true.
Workaround
as a workaround, i overridden method ru.wbbank.error.handler.starter.webmvc.controller.WBProblemDetailsExceptionHandler#handleAsyncRequestTimeoutException.
We create problemDetail manually, not by AsyncRequestTimeoutException:
Affects: 6.1.5
Hello. I noticed that when using the RFC7807 error handler, the AsyncRequestTimeoutException is not handled correctly.
The
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
class handles this exception:however, the getBody() method in the exception itself always returns a new object:
Because of this, populating the fields in the
org.springframework.web.ErrorResponse#updateAndGetBody
method (that called fromorg.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler#handleExceptionInternal
) has no effect.Reproduction:
spring.mvc.problemdetails.enabled: true
.we expect to see a response like this:
but in fact the response is:
Suggestion
I guess it can be fixed in AsyncRequestTimeoutException like that:
Workaround
as a workaround, i overridden method
ru.wbbank.error.handler.starter.webmvc.controller.WBProblemDetailsExceptionHandler#handleAsyncRequestTimeoutException
.We create
problemDetail
manually, not by AsyncRequestTimeoutException:The text was updated successfully, but these errors were encountered: