Low level exception handling in HTTP Interface Clients #33353
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: invalid
An issue that we don't feel is valid
Affects: 6.1.11
I am following https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface-exceptions and I'm trying to map exceptions from all 3 supported adapter clients to ones that do not have a dependency on concrete web stack dependency.
For handling response from WebFlux WebClient, the following is recommended in the linked guide
However, this does not cover the low level exception ,
org.springframework.web.reactive.function.client.WebClientRequestException
. Simplest way to trigger it is to give non-existing hostname as a URL.Is there a possibility to somehow plug in into the exchange function and re-map the
org.springframework.web.reactive.function.client.WebClientRequestException
to something else? I am not able to find a way with Spring Framework 6.1.11If I understand correctly, this is the equivalent of
ResourceAccessException
usually thrown in non-reactive RestClient(RestTemplate).I have tried
Where
SpringWebCompatibleStatusHandler
is as followsNone of the functions is called before or after I get
WebClientRequestException
The text was updated successfully, but these errors were encountered: