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
Affects versions from 5.3.15 to 6.0.0-20220310.112646-346. I have only tested it with these two versions, but I suspect the problem to exist in all 5.x versions.
When a @RequestBody-annotated argument fails to get resolved due to the an exception thrown in the constructor of the argument class, @ExceptionHandlers in @RestControllerAdvices are not taken into account in WebFlux, whereas it works as expected in WebMVC.
Thanks for the sample code. CustomException is a nested cause, more than a couple of levels deep. On the Spring MVC we unwrap all causes and provide those to the exception handler method. On the WebFlux side we only pass the first cause. It looks like we need to apply this change b587a16 on the WebFlux side too.
Affects versions from 5.3.15 to 6.0.0-20220310.112646-346. I have only tested it with these two versions, but I suspect the problem to exist in all 5.x versions.
When a
@RequestBody
-annotated argument fails to get resolved due to the an exception thrown in the constructor of the argument class,@ExceptionHandler
s in@RestControllerAdvice
s are not taken into account in WebFlux, whereas it works as expected in WebMVC.Below,
CustomWebFluxTest.test()
fails, whereasCustomWebMvcTest.test()
succeeds.The text was updated successfully, but these errors were encountered: