OnlyBiggg commited on
Commit
e29792b
·
1 Parent(s): 50821bb
Files changed (1) hide show
  1. common/external/external_api.py +2 -2
common/external/external_api.py CHANGED
@@ -26,7 +26,7 @@ class API():
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
32
  headers["token_type"] = "anonymous"
@@ -60,7 +60,7 @@ class API():
60
  return response.json()
61
  except httpx.HTTPStatusError as http_err:
62
  ## RETRY FOR 403 ERROR
63
- if http_err.response.status_code == 403:
64
  headers.pop("Authorization", None)
65
  headers["x-access-token"] = access_token
66
  headers["token_type"] = "anonymous"
 
26
 
27
  except httpx.HTTPStatusError as http_err:
28
  ## RETRY FOR 403 ERROR
29
+ if http_err.response.status_code == 403 or http_err.response.status_code == 401:
30
  headers.pop("Authorization", None)
31
  headers["x-access-token"] = access_token
32
  headers["token_type"] = "anonymous"
 
60
  return response.json()
61
  except httpx.HTTPStatusError as http_err:
62
  ## RETRY FOR 403 ERROR
63
+ if http_err.response.status_code == 403 or http_err.response.status_code == 401:
64
  headers.pop("Authorization", None)
65
  headers["x-access-token"] = access_token
66
  headers["token_type"] = "anonymous"