Skip to content

fix: avoid failover on client-local HTTP errors - #153

Merged
tharropoulos merged 2 commits into
typesense:masterfrom
abhinavrastogi2627:fix/client-errors-do-not-failover
Oct 7, 2026
Merged

tharropoulos merged 2 commits into
typesense:masterfrom
abhinavrastogi2627:fix/client-errors-do-not-failover

Conversation

@abhinavrastogi2627

Copy link
Copy Markdown
Contributor

Summary

Fixes #143 by keeping client-local httpx failures out of the node-health retry path. Pool exhaustion, local protocol errors, response decoding errors, and redirect-limit errors now propagate without marking a healthy server node unavailable.

The async source remains the source of truth; the sync client was regenerated with utils/run-unasync.py.

Validation

  • pytest tests/api_call_test.py -q (33 passed)
  • utils/run-unasync.py --check
  • git diff --check

A full pytest -q run requires a local Typesense server and also encountered existing unrelated fixture failures in this environment.

@tharropoulos

Copy link
Copy Markdown
Collaborator

thanks for this! i pushed one commit on top with extra tests: the same check for all four client-local errors (not just PoolTimeout), for both the sync and async clients, raised through httpx via respx rather than by mocking make_request. your fix commit is unchanged.

@tharropoulos
tharropoulos force-pushed the fix/client-errors-do-not-failover branch from e656c44 to a9be046 Compare October 7, 2026 10:11
@tharropoulos
tharropoulos merged commit 51caa32 into typesense:master Oct 7, 2026
5 checks passed
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.

PoolTimeout and other client-side httpx errors mark a healthy node unhealthy and fail over

2 participants