Added retry for error codes 421 and 500
This commit is contained in:
parent
6f0aa0360a
commit
8e55d638f1
1 changed files with 1 additions and 1 deletions
|
@ -102,7 +102,7 @@ class PyiCloudSession(Session):
|
||||||
LOGGER.debug("Cookies saved to %s", self.service.cookiejar_path)
|
LOGGER.debug("Cookies saved to %s", self.service.cookiejar_path)
|
||||||
|
|
||||||
if not response.ok and content_type not in json_mimetypes:
|
if not response.ok and content_type not in json_mimetypes:
|
||||||
if has_retried is None and response.status_code == 450:
|
if has_retried is None and response.status_code in [421, 450, 500]:
|
||||||
api_error = PyiCloudAPIResponseException(
|
api_error = PyiCloudAPIResponseException(
|
||||||
response.reason, response.status_code, retry=True
|
response.reason, response.status_code, retry=True
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue