Skip to content

Commit b910dc8

Browse files
increase status_code check to >= 500 (#73)
1 parent 9e04b5e commit b910dc8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scaleapi/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "2.14.0"
1+
__version__ = "2.14.1"
22
__package_name__ = "scaleapi"

scaleapi/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ def _api_request(
152152
# status=409,
153153
# redirect_location=None)
154154
if retry_history != ():
155-
# See if the first retry was a 500 error
156-
if retry_history[0][3] == 500:
155+
# See if the first retry was a 500 or 503 error
156+
if retry_history[0][3] >= 500:
157157
uuid = body["unique_id"]
158158
newUrl = f"{self.base_api_url}/tasks?unique_id={uuid}"
159159
# grab task from api

0 commit comments

Comments
 (0)