Retry issue after migration to 13.5
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
Hi
We use feign-java11 and feign-gson dependencies in our project and after we migrated from 13.1 to 13.5 one of our tests started failing.
This test uses WireMock and verifies that if malformed response is sent to the client then RetryableException is thrown.
extension.stubFor(post(urlEqualTo("/cities")).willReturn(aResponse().withFault(Fault.MALFORMED_RESPONSE_CHUNK)));
assertThrows(RetryableException.class, () -> cityClient.create(city));
In 13.1 this test passed but in 13.5 fails. Our investigation shown that in both Feign versions IOException is thrown but in 13.1 it's correctly caught in SynchronousMethodHandler.executeAndDecode:
java.io.IOException: chunked transfer encoding, state: READING_LENGTH
And in 13.5 it's not caught. The last line that was executed is
cf = sendAsync(req, responseHandler, null, null);
in HttpClientImpl.send
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with SynchronousMethodHandler.executeAndDecode and HttpClientImpl.send, then compare the IOException handling between Feign 13.1 and 13.5. Reproduce the WireMock MALFORMED_RESPONSE_CHUNK case from the issue and verify that the client again throws RetryableException as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100