* Error-Handler for error-messages from the Facebook Graph-API.
* <p>
* This error-handler handels responses withe the HTTP-status code
- * {@code 4xx}. It tries to extract and parse the error-message
+ * {@code 400 BAD REQUEST}. It tries to extract and parse the error-message
* from the HTTP-body. Successfully extracted and parsed messages are mapped
* to a hierarchy of exceptions, that reflects the hierarchy of the error-
* codes and -types.
* <p>
- * If the HTTP-status-code of the response is not {@code 4xx} or
+ * If the HTTP-status-code of the response is not {@code 400 BAD REQUEST} or
* the HTTP-body could not be extracted or parsed, this error-handler
* delegates the handling to its parent.
*
@Override
public void handleError(final ClientHttpResponse response) throws IOException
{
- if (!HttpStatus.Series.CLIENT_ERROR.equals(response.getStatusCode().series()))
+ if (!HttpStatus.BAD_REQUEST.equals(response.getStatusCode()))
{
- // Let the parent-error-handler handle all errors, that are no client
- // errors (4xx).
+ // We will only handle 400 BAD REQUEST
parent.handleError(response);
return;
}