Add HTTP 429 error handling
This commit is contained in:
parent
fa419980f5
commit
7b195c4b6a
@ -24,7 +24,7 @@ def failCheck(response, functOrigin):
|
||||
if response.status_code == 429:
|
||||
print("Too many requests!")
|
||||
time.sleep(int(response.headers["Retry-After"]))
|
||||
print("Retrying "+functOrigin"...")
|
||||
print("Retrying "+functOrigin+"...")
|
||||
return True
|
||||
elif response.status_code != 200:
|
||||
raise error
|
||||
|
Loading…
Reference in New Issue
Block a user