Completes async client futures when the delegate throws Error by hutiefang76 · Pull Request #3630 · OpenFeign/feign · GitHub
Skip to content

Completes async client futures when the delegate throws Error - #3630

Open
hutiefang76 wants to merge 1 commit into
OpenFeign:masterfrom
hutiefang76:frank/thirty-feign-async-error-20261019
Open

hutiefang76 wants to merge 1 commit into
OpenFeign:masterfrom
hutiefang76:frank/thirty-feign-async-error-20261019

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

Fixes #3629.

When a synchronous Client throws an Error, DefaultAsyncClient currently lets the executor capture it in a task future that is only used for cancellation. The separate future returned to the caller remains pending, including through AsyncFeign. Complete that future exceptionally with the original throwable. Executor rejection, cancellation, checked/runtime exceptions and the other async adapters retain their existing behavior.

Two bounded regressions cover the direct adapter and public proxy, with the same error instance asserted as the cause. IOException, runtime-exception and successful-response controls are included in the existing test class. The changelog records the fix; no API or dependency changes.

Validation:

  • Original source plus regressions: AsyncFeignTest 59 tests, 2 failures from the expected one-second timeouts; 0 errors/skips.
  • Fixed source: full core mvn -B -Pdev -pl core clean install passes, 777 tests, 0 failures/errors, 4 existing conditional skips. All 59 async tests pass without skips.
  • Root mvn -B -Pdev validate passes. Main sources used a real JDK 8 toolchain and tests used JDK 25. A normal checkout was used because the license plugin fails to recognize Git worktrees; license and formatting checks were retained, and the three final files were matched by SHA-256.

AI assistance: DeepSeek assisted implementation and first-pass review; Codex ran and checked the reproduction, validation and final diff. Remote CI and maintainer review remain pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DefaultAsyncClient never completes the returned future when Client throws Error

1 participant