Skip to content

Commit

Permalink
fix(client): retry if SSLWantReadError occurs in the async client (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed Nov 13, 2023
1 parent e661da6 commit b607e20
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/openai/_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

0 comments on commit b607e20

Please sign in to comment.