The exception implies the response is no longer usable, and it is handled in DefaultHandlerExceptionResolver
by not taking any action. However, as the resolver is ordered after ExceptionHandlerExceptionResolver
(i.e. handling via @ExceptionHandler
controller methods), it may not get a chance. We should also add handling in ResponseEntityExceptionHandler
, which has a better chance of taking effect.
Comment From: rnavarropiris
@rstoyanchev One question on this regards:
We added an @ErrorHandler to get rid of the log messages, but are wandering what to do about this.
We monitor our app using (among others) the http.server.requests.active.seconds.duration
metric. When such an error happens, we see such values:
http_server_requests_active_seconds_duration_sum{exception="IOException",method="...",oauthClient="...",outcome="SUCCESS",status="200",uri="..."}
which puzzles us, since the error handler is configured to return a 500 status.
What will be the expected behavior of this metric (with or without custom error handler) after the proposed fix?
Comment From: hw207165
Will this change merged to 5.3.x series?