We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3daeba commit 94c3254Copy full SHA for 94c3254
ai21/http_client.py
@@ -19,7 +19,7 @@
19
DEFAULT_NUM_RETRIES = 0
20
RETRY_BACK_OFF_FACTOR = 0.5
21
TIME_BETWEEN_RETRIES = 1000
22
-RETRY_ERROR_CODES = (429, 500, 503)
+RETRY_ERROR_CODES = (408, 429, 500, 503)
23
RETRY_METHOD_WHITELIST = ["GET", "POST", "PUT"]
24
25
@@ -46,7 +46,7 @@ def requests_retry_session(session, retries=0):
46
connect=retries,
47
backoff_factor=RETRY_BACK_OFF_FACTOR,
48
status_forcelist=RETRY_ERROR_CODES,
49
- method_whitelist=frozenset(RETRY_METHOD_WHITELIST),
+ allowed_methods=frozenset(RETRY_METHOD_WHITELIST),
50
)
51
adapter = HTTPAdapter(max_retries=retry)
52
session.mount("https://", adapter)
0 commit comments