-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
WebFlux: @ControllerAdvice should handle all the exceptions including from WebFilter #32924
Comments
The repro case is indeed quite straightforward. Although I'm not sure about the way you simulate a AFAIU filter errors are supposed to be processable by But here from what I've seen the error reaches an @rstoyanchev I would need your help in investigating this a bit further and determining if it a setup issue or if the repro case is indeed supposed to work as-is and this is an actual bug. |
@simonbasle , Thanks. I tried all these options - assuming at least one option should work.. none of them works! :(
|
I think this behavior should be by design. I believe the intent behind #22991 (aligning WebFlux with #22619) was for On the other hand, I think we can compare I believe The MVC documentation points to other handlers, not Sevlet Filters:
|
Indeed this is by design. Depending on what you need to do, Boot error handling also could be helpful for errors that happen outside, as well as errors that escape and remain not handled. |
@kitkars you can implement your own Let us know how it works for you. |
Thanks @bclozel . I am already using workarounds. The controller-advice is one such elegant way to keep centralized error handling for an app. Thanks. We can close this as there are work arounds. |
Thanks for letting us know. I'm glad this works for your app. |
Provide a mechanism to handle all the exceptions via
@ControllerAdvice
including the errors emitted from theWebFilter
.I have attached a simple reproducible project with latest spring boot 3.3.0 + WebFlux.
demo.zip
The text was updated successfully, but these errors were encountered: