Repository navigation
|
Hello! I want to receive raw body of any response (200, 400, 500) for using in unirest interceptor for logging. |
Answered by
ryber
Oct 8, 2021
Replies: 3 comments 4 replies
|
If it's a parsing error the original body is kept on the exception ... which, I realize is a little weird. but it's like this: unirest-java/unirest/src/test/java/BehaviorTests/AsObjectTest.java Lines 152 to 163 in f19ab41 |
3 replies
Answer selected by
aceton41k
|
There is a mapError method that will have the error. You can map it into a error object or just a string: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

If it's a parsing error the original body is kept on the exception ... which, I realize is a little weird. but it's like this:
unirest-java/unirest/src/test/java/BehaviorTests/AsObjectTest.java
Lines 152 to 163 in f19ab41