Class DefaultWebClientErrorDecoder
- java.lang.Object
-
- org.bremersee.web.reactive.function.client.AbstractWebClientErrorDecoder<WebClientException>
-
- org.bremersee.web.reactive.function.client.DefaultWebClientErrorDecoder
-
- All Implemented Interfaces:
Function<org.springframework.web.reactive.function.client.ClientResponse,reactor.core.publisher.Mono<? extends Throwable>>
,WebClientErrorDecoder<WebClientException>
public class DefaultWebClientErrorDecoder extends AbstractWebClientErrorDecoder<WebClientException>
This web client error decoder generates aWebClientException
from the error response.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description DefaultWebClientErrorDecoder()
Instantiates a new web client error decoder.DefaultWebClientErrorDecoder(RestApiExceptionParser parser)
Instantiates a new web client error decoder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebClientException
buildException(org.springframework.web.reactive.function.client.ClientResponse clientResponse, String response)
Build exception.-
Methods inherited from class org.bremersee.web.reactive.function.client.AbstractWebClientErrorDecoder
apply
-
-
-
-
Constructor Detail
-
DefaultWebClientErrorDecoder
public DefaultWebClientErrorDecoder()
Instantiates a new web client error decoder.
-
DefaultWebClientErrorDecoder
public DefaultWebClientErrorDecoder(RestApiExceptionParser parser)
Instantiates a new web client error decoder.- Parameters:
parser
- the parser
-
-
Method Detail
-
buildException
public WebClientException buildException(org.springframework.web.reactive.function.client.ClientResponse clientResponse, String response)
Description copied from interface:WebClientErrorDecoder
Build exception.- Parameters:
clientResponse
- the client responseresponse
- the response- Returns:
- the exception
-
-