Skip to content

Commit

Permalink
Merge pull request #522 from Backblaze/catch_timeout
Browse files Browse the repository at this point in the history
Add upload token reset after upload timeout
ppolewicz authored Nov 13, 2024

Verified

This commit was signed with the committer’s verified signature.
GCdePaula Gabriel Coutinho de Paula
2 parents 26f45a5 + bcf467c commit 72772f4
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions b2sdk/_internal/b2http.py
Original file line number Diff line number Diff line change
@@ -551,6 +551,8 @@ def _translate_errors(cls, fcn, post_params=None):
# an upload request for cause, so we use a 400 Bad Request
# code.
raise BrokenPipe()
elif isinstance(e2, TimeoutError):
raise B2RequestTimeout(str(e0))
raise B2ConnectionError(str(e0))

except requests.Timeout as e:
1 change: 1 addition & 0 deletions changelog.d/+17dd34ae.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add upload token reset after upload timeout.

0 comments on commit 72772f4

Please sign in to comment.