-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Throw exception if no handler found in Webflux #29568
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
Comments
Hi @alxxyz By default, the DispatcherServlet does not throw a NoHandlerFoundException. You need to enable that: Check if you have right configuration in your application.properties. Besides, if you are using @EnableWebMvc then it is likely that your changes made, for example, in properties files will be overwritten. |
I am using Webflux instead of WebMvc, does it work also for Webflux? |
@alxxyz that should be the case out of the box in WebFlux, in DispatcherHandler. |
@rstoyanchev can you please advise how I can catch it and override the response? |
Yes, we have an API contract and I need to send a custom body |
I see, so that's supported from 6.0 onwards. In 5.3.x, you can use a |
Thank you @rstoyanchev |
How to throw exception if no handler found in Webflux?
The text was updated successfully, but these errors were encountered: