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<org.bremersee.exception.RestApiResponseException>
public class DefaultWebClientErrorDecoder
extends Object
implements WebClientErrorDecoder<org.bremersee.exception.RestApiResponseException>
This web client error decoder generates a
RestApiResponseException from the error
response.- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new web client error decoder.DefaultWebClientErrorDecoder(org.bremersee.exception.RestApiExceptionParser parser) Instantiates a new web client error decoder. -
Method Summary
Modifier and TypeMethodDescriptionorg.bremersee.exception.RestApiResponseExceptionbuildException(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, waitMethods inherited from interface org.bremersee.exception.webclient.WebClientErrorDecoder
apply
-
Constructor Details
-
DefaultWebClientErrorDecoder
public DefaultWebClientErrorDecoder()Instantiates a new web client error decoder. -
DefaultWebClientErrorDecoder
public DefaultWebClientErrorDecoder(org.bremersee.exception.RestApiExceptionParser parser) Instantiates a new web client error decoder.- Parameters:
parser- the parser
-
-
Method Details
-
buildException
public org.bremersee.exception.RestApiResponseException buildException(org.springframework.web.reactive.function.client.ClientResponse clientResponse, String response) Description copied from interface:WebClientErrorDecoderBuild exception.- Specified by:
buildExceptionin interfaceWebClientErrorDecoder<org.bremersee.exception.RestApiResponseException>- Parameters:
clientResponse- the client responseresponse- the response- Returns:
- the exception
-