diff --git a/b2sdk/_internal/b2http.py b/b2sdk/_internal/b2http.py index 0d0fe031..448b075c 100644 --- a/b2sdk/_internal/b2http.py +++ b/b2sdk/_internal/b2http.py @@ -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: diff --git a/changelog.d/+17dd34ae.fixed.md b/changelog.d/+17dd34ae.fixed.md new file mode 100644 index 00000000..5f8683f2 --- /dev/null +++ b/changelog.d/+17dd34ae.fixed.md @@ -0,0 +1 @@ +Add upload token reset after upload timeout