Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.web.client
Interface ResponseErrorHandler

All Known Implementing Classes:
  DefaultResponseErrorHandler

    public interface ResponseErrorHandler

Strategy interface used by the `RestTemplate` to determine whether a particular response has an error or not.

Since:
  3.0
Author:
  Arjen Poutsma

Method Summary
`void` | `handleError(ClientHttpResponse response)` Handles the error in the given response.
`boolean` | `hasError(ClientHttpResponse response)` Indicates whether the given response has any errors.

Method Detail

### hasError

    boolean hasError(ClientHttpResponse response)
                     throws java.io.IOException

  Indicates whether the given response has any errors. Implementations will typically inspect the `HttpStatus` of the response.

  Parameters:
    `response` - the response to inspect
  Returns:
    `true` if the response has an error; `false` otherwise
  Throws:
    `java.io.IOException` - in case of I/O errors

### handleError

    void handleError(ClientHttpResponse response)
                     throws java.io.IOException

  Handles the error in the given response. This method is only called when `hasError(ClientHttpResponse)` has returned `true`.

  Parameters:
    `response` - the response with the error
  Throws:
    `java.io.IOException` - in case of I/O errors

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD