public static class ErrorDecoder.Default extends Object implements ErrorDecoder
ErrorDecoder.Default, ErrorDecoder.RetryAfterDecoder
Constructor and Description |
---|
Default() |
Modifier and Type | Method and Description |
---|---|
Exception |
decode(String methodKey,
Response response)
Implement this method in order to decode an HTTP
Response when
Response.status() is not in the 2xx range. |
public Exception decode(String methodKey, Response response)
ErrorDecoder
Response
when
Response.status()
is not in the 2xx range. Please raise application-specific exceptions
where possible. If your exception is retryable, wrap or subclass RetryableException
decode
in interface ErrorDecoder
methodKey
- Feign.configKey(java.lang.Class, java.lang.reflect.Method)
of the java method that invoked the request. ex.
IAM#getUser()
response
- HTTP response where status
is greater than or equal
to 300
.RetryableException
Copyright © 2012–2020 OpenFeign. All rights reserved.