Component
CLI
Priority
P0 - Critical (Blocking work)
SDK Language(s)
Python
Bug Description
The blind except masks a bug trying to compare a string to and int, and has never worked.
Example:
|
def _parse_retry_after(response_headers: httpx.Headers) -> typing.Optional[float]: |
|
""" |
|
This function parses the `Retry-After` header in a HTTP response and returns the number of seconds to wait. |
|
|
|
Inspired by the urllib3 retry implementation. |
|
""" |
|
retry_after_ms = response_headers.get("retry-after-ms") |
|
if retry_after_ms is not None: |
|
try: |
|
return int(retry_after_ms) / 1000 if retry_after_ms > 0 else 0 |
|
except Exception: |
|
pass |
Versions
0.19.0-rc5 to latest
Workaround
No
Are you interested in contributing a fix?
Yes
Component
CLI
Priority
P0 - Critical (Blocking work)
SDK Language(s)
Python
Bug Description
The blind except masks a bug trying to compare a string to and int, and has never worked.
Example:
fern/seed/python-sdk/imdb/src/seed/core/http_client.py
Lines 26 to 37 in 5802970
Versions
0.19.0-rc5 to latest
Workaround
No
Are you interested in contributing a fix?
Yes