Skip to content

fix: add ConnectError to embedding retry exceptions#353

Merged
pancacake merged 1 commit intoHKUDS:devfrom
S-A-D-4:fix/embedding-connecterror-retry
Apr 22, 2026
Merged

fix: add ConnectError to embedding retry exceptions#353
pancacake merged 1 commit intoHKUDS:devfrom
S-A-D-4:fix/embedding-connecterror-retry

Conversation

@S-A-D-4
Copy link
Copy Markdown
Contributor

@S-A-D-4 S-A-D-4 commented Apr 20, 2026

Summary

  • Added httpx.ConnectError to the retry exception list in the embedding adapter
  • This fixes an issue where transient network connectivity errors (TLS handshake failures, proxy connection issues) would cause immediate failure instead of retry

Problem

When creating a knowledge base, the embedding process would occasionally fail with httpx.ConnectError. The retry mechanism only caught timeout errors (ReadTimeout, ConnectTimeout, PoolTimeout) but not ConnectError, which occurs during TLS handshake failures or proxy connection issues.

Solution

Added httpx.ConnectError to the exception tuple in the retry handler, ensuring that transient connection errors are retried with exponential backoff (up to 5 retries).

Testing

  • Verified that embedding requests work correctly with the change
  • Tested both direct connection and proxy scenarios
  • Confirmed retry behavior works as expected

The embedding adapter's retry mechanism was missing httpx.ConnectError,
causing immediate failure instead of retry when network connectivity
issues occur (e.g., TLS handshake failures, proxy connection issues).

This fix ensures that transient connection errors are retried with
exponential backoff, improving reliability during knowledge base
initialization.
@pancacake pancacake changed the base branch from main to dev April 22, 2026 09:04
@pancacake pancacake merged commit 568085c into HKUDS:dev Apr 22, 2026
@S-A-D-4 S-A-D-4 deleted the fix/embedding-connecterror-retry branch April 22, 2026 09:16
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.

2 participants