Skip to content
Snippets Groups Projects
Unverified Commit 4ef5fcb4 authored by Vladislav Suchkov's avatar Vladislav Suchkov Committed by GitHub
Browse files

Made 429 Too Many Request HTTP error in `raw_call()` of `client.py` retryable (#337)

made 429 Too Many Request HTTP error in raw_call() retryable
parent afe07a69
No related branches found
No related tags found
No related merge requests found
......@@ -501,7 +501,10 @@ class Site:
# fall through to the sleep
elif stream.status_code == 200:
return stream.text
elif stream.status_code < 500 or stream.status_code > 599:
elif (
(stream.status_code < 500 or stream.status_code > 599)
and stream.status_code != 429 # 429 Too Many Requests is retryable
):
stream.raise_for_status()
else:
if not retry_on_error:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment