projects
/
facebook-errors
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c2be258
)
The body is printed out readable, if an exception occures during parsing
author
Kai Moritz
<kai@juplo.de>
Mon, 9 Jul 2018 18:58:13 +0000
(20:58 +0200)
committer
Kai Moritz
<kai@juplo.de>
Mon, 9 Jul 2018 18:58:13 +0000
(20:58 +0200)
src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
b/src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
index
e541965
..
fe2932c
100644
(file)
--- a/
src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
+++ b/
src/main/java/de/juplo/facebook/errors/GraphApiErrorHandler.java
@@
-89,7
+89,12
@@
public class GraphApiErrorHandler implements ResponseErrorHandler
// The body of the HTTP-message could not be parsed.
// Let the parent error-handler try to handle the response.
// The body of the HTTP-message could not be parsed.
// Let the parent error-handler try to handle the response.
- LOG.warn("Could not convert the response into an exception, because the body is unparsable: {}", body);
+ LOG.warn(
+ "Could not convert the response into an exception, " +
+ "because the body is unparsable: error={}, body={}",
+ e.toString(),
+ new String(body, Charset.forName("UTF-8"))
+ );
// To do so, we have to wrap the original response to fill in
// the buffered body, if needed
// To do so, we have to wrap the original response to fill in
// the buffered body, if needed