1
0
mirror of synced 2025-12-26 14:02:10 -05:00

🐛Source Github: remove BAD_GATEWAY code from backoff_time (#9999)

* remove BAD_GATEWAY code from backoff_time

* bump version

* bump version

* add unit test

* bump version
This commit is contained in:
Anna Lvova
2022-02-09 11:10:16 +01:00
committed by GitHub
parent 05873803c9
commit 8749c7ab2c
6 changed files with 52 additions and 46 deletions

View File

@@ -72,7 +72,7 @@ class GithubStream(HttpStream, ABC):
# `X-RateLimit-Reset` header which contains time when this hour will be finished and limits will be reset so
# we again could have 5000 per another hour.
if response.status_code in [requests.codes.BAD_GATEWAY, requests.codes.SERVER_ERROR]:
if response.status_code == requests.codes.SERVER_ERROR:
return None
reset_time = response.headers.get("X-RateLimit-Reset")