}
- @Override
- public boolean hasError(ClientHttpResponse response) throws IOException
+ private boolean hasGraphApiError(ClientHttpResponse response) throws IOException
{
return HttpStatus.Series.CLIENT_ERROR.equals(response.getStatusCode().series());
}
@Override
- public void handleError(final ClientHttpResponse response) throws IOException
+ public boolean hasError(ClientHttpResponse response) throws IOException
{
- GraphApiErrorResponseErrorHandler.handleError(parent, response);
+ return hasGraphApiError(response) || parent.hasError(response);
}
- public static void handleError(
- final ResponseErrorHandler parent,
- final ClientHttpResponse response
- )
- throws
- IOException
+ @Override
+ public void handleError(final ClientHttpResponse response) throws IOException
{
+ if (!hasGraphApiError(response))
+ {
+ parent.handleError(response);
+ return;
+ }
+
if (response.getBody() == null)
{
// There is no body to interpret in the HTTP-message