Package feign.codec
Class ErrorDecoder.Default
- java.lang.Object
-
- feign.codec.ErrorDecoder.Default
-
- All Implemented Interfaces:
ErrorDecoder
- Enclosing interface:
- ErrorDecoder
public static class ErrorDecoder.Default extends java.lang.Object implements ErrorDecoder
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface feign.codec.ErrorDecoder
ErrorDecoder.Default, ErrorDecoder.RetryAfterDecoder
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Exceptiondecode(java.lang.String methodKey, Response response)Implement this method in order to decode an HTTPResponsewhenResponse.status()is not in the 2xx range.
-
-
-
Method Detail
-
decode
public java.lang.Exception decode(java.lang.String methodKey, Response response)Description copied from interface:ErrorDecoderImplement this method in order to decode an HTTPResponsewhenResponse.status()is not in the 2xx range. Please raise application-specific exceptions where possible. If your exception is retryable, wrap or subclassRetryableException- Specified by:
decodein interfaceErrorDecoder- Parameters:
methodKey-Feign.configKey(java.lang.Class, java.lang.reflect.Method)of the java method that invoked the request. ex.IAM#getUser()response- HTTP response wherestatusis greater than or equal to300.- Returns:
- Exception IOException, if there was a network error reading the response or an
application-specific exception decoded by the implementation. If the throwable is
retryable, it should be wrapped, or a subtype of
RetryableException
-
-