-
Notifications
You must be signed in to change notification settings - Fork 41.2k
WebClient defaultStatusHandler raise a WebClientRequestException in a NONE-Web Environment #45668
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
I'm unable to reproduce the problem by following the provided steps. Here's the client's output:
|
I used
I have added the RestExceptionHandler in the server, and in the client module, at the end of the listener method, it tried to |
Thanks, but that doesn't help me to reproduce the described behavior. The situation's not helped by the complexity of the sample. It seems to include quite a few things that are unrelated to WebClient's behavior. For example, the mapping to problem details does not seem to be relevant. Creating, saving, and deleting entries in a repository also seems to be unrelated from what you have described and a simple HTTP call that receives a 404 response should be sufficient. If you would like us to spend more time investigating, please take the time to produce a sample that focuses only on the problem and contains the bare minimum of code and dependencies that is necessary to reproduce it. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
Uh oh!
There was an error while loading. Please reload this page.
My example project: https://github.com/hantsy/spring6-sandbox/tree/master/boot-http-service
Reproducing Steps:
mvn clean compile -DskipTests
in the project root folder.mvn spring-boot:run
in server and client folder respectively.You will see an exception like the following in the client console.
If I remove the
spring.main.web-application-type
line in the client application.properties and set up theserver.port=8888
, and rerun the application, the.defaultStatusHandler
will raiseWebClientRespoonseException.$NotFound
as expected.But the
WebClient
should work in a none-web application as expected.The text was updated successfully, but these errors were encountered: