-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
rodolphocouto opened SPR-17239 and commented
This bug occurs when the WebTestClient is used to test a router function with custom exception handler, for example:
WebTestClient
.bindToRouterFunction(myRouter())
.handlerStrategies(HandlerStrategies.builder()
.exceptionHandler(new CustomExceptionHandler()) // IS NOT CALLED :(
.build())
.build()
With annotated controllers, the same custom exception is called, for example:
WebTestClient
.bindToController(new MyController())
.controllerAdvice(new CustomExceptionHandler()) // IS CALLED :)
.build()
Affects: 5.0.8
Reference URL: https://github.com/rodolphocouto/spring-framework-issues/tree/master/SPR-17239
sann3 and Lee-WonJun
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulein: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement