The exception stores the HttpStatus and HttpHeaders of the failed request
[facebook-errors] / src / main / java / de / juplo / facebook / errors / GraphApiErrorHandler.java
index fe2932c..265f145 100644 (file)
@@ -80,7 +80,7 @@ public class GraphApiErrorHandler implements ResponseErrorHandler
 
     try
     {
-      error = GraphApiException.create(body);
+      error = GraphApiException.create(response.getStatusCode(), response.getHeaders(), body);
       if (LOG.isInfoEnabled())
         LOG.info("error-response: {}", new String(body, Charset.forName("UTF-8")));
     }