Skip to content

Commit 7356ab5

Browse files
Retry on 499 status code (#563)
* Update base.py * Fix lint
1 parent 935dddb commit 7356ab5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

polygon/rest/base.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ def __init__(
5454
# https://urllib3.readthedocs.io/en/stable/reference/urllib3.util.html#urllib3.util.Retry.RETRY_AFTER_STATUS_CODES
5555
retry_strategy = Retry(
5656
total=self.retries,
57-
status_forcelist=[413, 429, 500, 502, 503, 504], # default 413, 429, 503
57+
status_forcelist=[
58+
413,
59+
429,
60+
499,
61+
500,
62+
502,
63+
503,
64+
504,
65+
], # default 413, 429, 503
5866
backoff_factor=0.1, # [0.0s, 0.2s, 0.4s, 0.8s, 1.6s, ...]
5967
)
6068

0 commit comments

Comments
 (0)