Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
312de80
1
Parent(s):
315297c
common/external/external_api.py
CHANGED
|
@@ -25,6 +25,7 @@ class API():
|
|
| 25 |
# return {"error": f"HTTP {http_err.response.status_code}: {http_err.response.text}"}
|
| 26 |
|
| 27 |
except httpx.HTTPStatusError as http_err:
|
|
|
|
| 28 |
if http_err.response.status_code == 403:
|
| 29 |
headers.pop("Authorization", None)
|
| 30 |
headers["x-access-token"] = access_token
|
|
|
|
| 25 |
# return {"error": f"HTTP {http_err.response.status_code}: {http_err.response.text}"}
|
| 26 |
|
| 27 |
except httpx.HTTPStatusError as http_err:
|
| 28 |
+
## RETRY FOR 403 ERROR
|
| 29 |
if http_err.response.status_code == 403:
|
| 30 |
headers.pop("Authorization", None)
|
| 31 |
headers["x-access-token"] = access_token
|