Skip to content

Commit 8130146

Browse files
Retry on 403 Forbidden for rate limiting, typo in exception note
1 parent 67f985a commit 8130146

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

comanage_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
MAX_ATTEMPTS = 5
3232

3333
# HTTP return codes we shouldn't attempt to retry
34-
HTTP_NO_RETRY_CODES = {403, 404, 405, 500}
34+
#HTTP_NO_RETRY_CODES = {403, 404, 405, 500}
35+
HTTP_NO_RETRY_CODES = {404, 405, 500}
3536

3637
GET = "GET"
3738
PUT = "PUT"
@@ -119,7 +120,7 @@ def call_api3(method, target, data, endpoint, authstr, **kw):
119120
+ f"Exception reason: {exception}.\n Request: {req.full_url}",
120121
code=exception.code
121122
)
122-
# Since we think the expection *might* be transient, continue with retry logic
123+
# Since we think the exception *might* be transient, continue with retry logic
123124
if req_attempts >= MAX_ATTEMPTS:
124125
raise URLRequestError(
125126
"Exception raised after maximum number of retries reached after total backoff of " +

0 commit comments

Comments
 (0)