Skip to content

Commit 9c28470

Browse files
Prevent unexpected retries on error
1 parent 7f5f9c1 commit 9c28470

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

shotgun_api3/shotgun.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,11 +3938,10 @@ def _make_call(self, verb, path, body, headers):
39383938
if attempt == max_rpc_attempts:
39393939
LOG.debug("Request failed. Giving up after %d attempts." % attempt)
39403940
raise
3941-
except Exception:
3941+
except Exception as e:
39423942
self._close_connection()
3943-
if attempt == max_rpc_attempts:
3944-
LOG.debug("Request failed. Giving up after %d attempts." % attempt)
3945-
raise
3943+
LOG.debug(f"Request failed. Reason: {e}")
3944+
raise
39463945

39473946
LOG.debug(
39483947
"Request failed, attempt %d of %d. Retrying in %.2f seconds..."

0 commit comments

Comments
 (0)