Class MessageAwareWebClientErrorDecoder
- java.lang.Object
-
- org.bremersee.web.reactive.function.client.AbstractWebClientErrorDecoder<WebClientException>
-
- org.bremersee.web.reactive.function.client.MessageAwareWebClientErrorDecoder
-
- All Implemented Interfaces:
Function<org.springframework.web.reactive.function.client.ClientResponse,reactor.core.publisher.Mono<? extends Throwable>>
,WebClientErrorDecoder<WebClientException>
public class MessageAwareWebClientErrorDecoder extends AbstractWebClientErrorDecoder<WebClientException>
This web client error decoder generates aWebClientException
from the error response.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description MessageAwareWebClientErrorDecoder()
Instantiates a new message aware web client error decoder.MessageAwareWebClientErrorDecoder(String errorCode)
Instantiates a new message aware web client error decoder.MessageAwareWebClientErrorDecoder(org.bremersee.exception.ExceptionParser<String> parser)
Instantiates a new message aware web client error decoder.MessageAwareWebClientErrorDecoder(org.bremersee.exception.ExceptionParser<String> parser, String errorCode)
Instantiates a new message aware 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
-
MessageAwareWebClientErrorDecoder
public MessageAwareWebClientErrorDecoder()
Instantiates a new message aware web client error decoder.
-
MessageAwareWebClientErrorDecoder
public MessageAwareWebClientErrorDecoder(String errorCode)
Instantiates a new message aware web client error decoder.- Parameters:
errorCode
- the error code
-
MessageAwareWebClientErrorDecoder
public MessageAwareWebClientErrorDecoder(org.bremersee.exception.ExceptionParser<String> parser)
Instantiates a new message aware 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
-
-