Skip to content

fix(client): retry if SSLWantReadError occurs in the async client #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/finch/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,12 +1320,6 @@ async def _request(
if retries > 0:
return await self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls)
raise APITimeoutError(request=request) from err
except httpx.ReadTimeout as err:
# We explicitly do not retry on ReadTimeout errors as this means
# that the server processing the request has taken 60 seconds
# (our default timeout). This likely indicates that something
# is not working as expected on the server side.
raise
except httpx.TimeoutException as err:
if retries > 0:
return await self._retry_request(options, cast_to, retries, stream=stream, stream_cls=stream_cls)
Expand Down