Skip to content

WebClient defaultStatusHandler raise a WebClientRequestException in a NONE-Web Environment #45668

Open
@hantsy

Description

@hantsy

My example project: https://github.com/hantsy/spring6-sandbox/tree/master/boot-http-service

  • Java 21
  • Spring Boot 3.5.0
  • WebFlux Stack

Reproducing Steps:

  1. run mvn clean compile -DskipTests in the project root folder.
  2. run mvn spring-boot:run in server and client folder respectively.

You will see an exception like the following in the client console.

org.springframework.web.reactive.function.client.WebClientRequestException: 
executor not accepting a task
	
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$wrapException$9(ExchangeFunctions.java:137) ~[spring-webflux-6.2.7.jar:6.2.7]

If I remove the spring.main.web-application-type line in the client application.properties and set up the server.port=8888, and rerun the application, the .defaultStatusHandler will raise WebClientRespoonseException.$NotFound as expected.

But the WebClient should work in a none-web application as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: feedback-reminderWe've sent a reminder that we need additional information before we can continuestatus: waiting-for-feedbackWe need additional information before we can continuestatus: waiting-for-triageAn issue we've not yet triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions