public interface ResponseErrorHandler
RestTemplate
to determine whether a particular response has an error or not.Modifier and Type | Method and Description |
---|---|
void |
handleError(ClientHttpResponse response)
Handles the error in the given response.
|
boolean |
hasError(ClientHttpResponse response)
Indicates whether the given response has any errors.
|
boolean hasError(ClientHttpResponse response) throws IOException
HttpStatus
of the response.response
- the response to inspecttrue
if the response has an error; false
otherwiseIOException
- in case of I/O errorsvoid handleError(ClientHttpResponse response) throws IOException
hasError(ClientHttpResponse)
has returned true
.response
- the response with the errorIOException
- in case of I/O errors