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

WebTestClient.bindToRouterFunction(...) with exception handler not working [SPR-17239] #21772

spring-issuemaster opened this issue Sep 3, 2018 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Sep 3, 2018

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:


        .exceptionHandler(new CustomExceptionHandler()) // IS NOT CALLED :(



With annotated controllers, the same custom exception is called, for example:


    .bindToController(new MyController())
    .controllerAdvice(new CustomExceptionHandler()) // IS CALLED :)


Affects: 5.0.8

Reference URL:


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Oct 12, 2018

Rossen Stoyanchev commented

Looks like several options in HandlerStrategies were added later, but bindToRouterFunction was never updated. This should be fixed now in master for 5.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.