projects
/
facebook-errors
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactoring: generalized the GraphApiErrorHandler
[facebook-errors]
/
src
/
main
/
java
/
de
/
juplo
/
facebook
/
errors
/
GraphApiErrorHandler.java
diff --git
a/src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
b/src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
index
13a93e8
..
e541965
100644
(file)
--- a/
src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
+++ b/
src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
@@
-57,15
+57,16
@@
public class GraphApiErrorHandler implements ResponseErrorHandler
@Override
public void handleError(final ClientHttpResponse response) throws IOException
{
@Override
public void handleError(final ClientHttpResponse response) throws IOException
{
- if (!HttpStatus.BAD_REQUEST.equals(response.getStatusCode()))
- {
- // We will only handle 400 BAD REQUEST
- LOG.debug("ignoring response with status-code {}.", response.getStatusCode());
- parent.handleError(response);
- return;
- }
-
+ GraphApiErrorHandler.handleError(parent, response);
+ }
+ public static void handleError(
+ final ResponseErrorHandler parent,
+ final ClientHttpResponse response
+ )
+ throws
+ IOException
+ {
if (response.getBody() == null)
{
// There is no body to interpret in the HTTP-message
if (response.getBody() == null)
{
// There is no body to interpret in the HTTP-message