Class DefaultWebClientErrorDecoder
java.lang.Object
org.bremersee.exception.webclient.DefaultWebClientErrorDecoder
- All Implemented Interfaces:
Function<org.springframework.web.reactive.function.client.ClientResponse,
,reactor.core.publisher.Mono<? extends Throwable>> WebClientErrorDecoder<RestApiResponseException>
public class DefaultWebClientErrorDecoder
extends Object
implements WebClientErrorDecoder<RestApiResponseException>
This web client error decoder generates a
RestApiResponseException
from the error
response.- Author:
- Christian Bremer
-
Constructor Summary
ConstructorDescriptionInstantiates a new web client error decoder.Instantiates a new web client error decoder. -
Method Summary
Modifier and TypeMethodDescriptionbuildException
(org.springframework.web.reactive.function.client.ClientResponse clientResponse, String response) Build exception.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bremersee.exception.webclient.WebClientErrorDecoder
apply
-
Constructor Details
-
DefaultWebClientErrorDecoder
public DefaultWebClientErrorDecoder()Instantiates a new web client error decoder. -
DefaultWebClientErrorDecoder
Instantiates a new web client error decoder.- Parameters:
parser
- the parser
-
-
Method Details
-
buildException
public RestApiResponseException buildException(org.springframework.web.reactive.function.client.ClientResponse clientResponse, String response) Description copied from interface:WebClientErrorDecoder
Build exception.- Specified by:
buildException
in interfaceWebClientErrorDecoder<RestApiResponseException>
- Parameters:
clientResponse
- the client responseresponse
- the response- Returns:
- the exception
-