ResponseErrorHandler (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

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

    Methods
    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.

- - ### Method Detail

    - #### hasError

          boolean hasError(ClientHttpResponse response)
                           throws 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:
        `IOException` - in case of I/O errors

    - #### handleError

          void handleError(ClientHttpResponse response)
                           throws 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:
        `IOException` - in case of I/O errors