-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
documentationIssues that require updates to our documentationIssues that require updates to our documentation
Description
While working on #912 I came across an odd behaviour:
In errorStatus a FeignException is created with the response's body:
| body = Util.toByteArray(response.body().asInputStream()); |
In errorReading a FeignException is created with the request's body (even though the response with its body would be at hand):
| request.body()); |
I think it's inconsistent and confusing for the user as he or she can't rely on the same data-source for all exceptions. On the other hand, I'm not sure whether it's intentional as there are unit-tests that check this behaviour, thus changing it could also be breaking-change for users:
feign/core/src/test/java/feign/FeignTest.java
Line 525 in ce66205
| assertThat(e.contentUTF8()).isEqualTo("Request body"); |
If we agree on returning the response-body, I'd gladly create a PR for it.
Metadata
Metadata
Assignees
Labels
documentationIssues that require updates to our documentationIssues that require updates to our documentation