Add HTTP 429 error handling

This commit is contained in:
Chloe Fontenot 🏳️‍⚧️ 2022-02-24 13:30:36 -06:00
parent fa419980f5
commit 7b195c4b6a

View File

@ -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