fix: chatgpt hotfix (#95)

pull/97/head
Laurel Orr 1 year ago committed by GitHub
parent af23272cb5
commit 93ff2cb3c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,7 +37,8 @@ def retry_if_ratelimit(retry_base: RetryCallState) -> bool:
exception = cast(
requests.exceptions.HTTPError, retry_base.outcome.exception()
)
if exception.response.status_code == 429: # type: ignore
# 500 is a server error, 429 is a rate limit error
if exception.response.status_code in {429, 500}: # type: ignore
return True
except Exception:
pass

Loading…
Cancel
Save