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 7fc823d commit a2082dbCopy full SHA for a2082db
scaleapi/api.py
@@ -144,10 +144,10 @@ def _api_request(
144
# Some endpoints only return 'OK' message without JSON
145
return json
146
elif res.status_code == 409 and "task" in endpoint and body.get("unique_id"):
147
- retry_history = None
148
- if "retries" in res.raw and "history" in res.raw.retries:
+ try:
149
retry_history = res.raw.retries.history
150
-
+ except AttributeError:
+ retry_history = []
151
# Example RequestHistory tuple
152
# RequestHistory(method='POST',
153
# url='/v1/task/imageannotation',
0 commit comments