Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handling for AsyncRequestNotUsableException to ResponseEntityExceptionHandler #33225

Closed
rstoyanchev opened this issue Jul 17, 2024 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

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.

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Jul 17, 2024
@rstoyanchev rstoyanchev added this to the 6.2.0-M6 milestone Jul 17, 2024
@rstoyanchev rstoyanchev self-assigned this Jul 17, 2024
@snicoll snicoll modified the milestones: 6.2.0-M6, 6.2.0-M7 Jul 18, 2024
@rnavarropiris
Copy link

@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?

@hw207165
Copy link

Will this change merged to 5.3.x series?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants