code: private void handleResponseError(String method, URI uri, Response response)
      {
          if(throwExceptions 
               && response.getStatus() != 200 
               && response.getStatus() != 201 
               && response.getStatus() != 204)
          {
              ErrorResponse error = null;
              if(response.hasEntity())
                  error = response.readEntity(ERROR);
              throw new ErrorResponseException(method, response.getStatus(), 
                  response.getStatusInfo().getReasonPhrase(), error);
          }
      }
docs: Handle HTTP error responses if {@link #throwExceptions() throwExceptions} returns <CODE>true</CODE>.
  @param method The HTTP method type
  @param uri The URI used for the HTTP call
  @param response The HTTP call response