Except all types of timeout error

Closes #4172.
This commit is contained in:
Lonami Exo 2023-08-18 18:36:30 +02:00
parent 128b707488
commit b0f9fd1f25
4 changed files with 5 additions and 4 deletions

View File

@ -80,7 +80,7 @@ class _DirectDownloadIter(RequestIter):
else:
return result.bytes
except errors.TimeoutError as e:
except errors.TimedOutError as e:
if self._timed_out:
self.client._log[__name__].warning('Got two timeouts in a row while downloading file')
raise

View File

@ -308,7 +308,7 @@ class UpdateMethods:
diff = await self(get_diff)
except (
errors.ServerError,
errors.TimeoutError,
errors.TimedOutError,
errors.FloodWaitError,
ValueError
) as e:
@ -384,7 +384,7 @@ class UpdateMethods:
errors.PersistentTimestampOutdatedError,
errors.PersistentTimestampInvalidError,
errors.ServerError,
errors.TimeoutError,
errors.TimedOutError,
errors.FloodWaitError,
ValueError
) as e:

View File

@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
__version__ = '1.29.2'
__version__ = '1.29.3'

View File

@ -464,6 +464,7 @@ TTL_MEDIA_INVALID,400,The provided media cannot be used with a TTL
TTL_PERIOD_INVALID,400,The provided TTL Period is invalid
TYPES_EMPTY,400,The types field is empty
TYPE_CONSTRUCTOR_INVALID,400,The type constructor is invalid
Timedout,-503,Timeout while fetching data
Timeout,-503,Timeout while fetching data
UNKNOWN_ERROR,400,
UNKNOWN_METHOD,500,The method you tried to call cannot be called on non-CDN DCs

1 name codes description
464 TTL_PERIOD_INVALID 400 The provided TTL Period is invalid
465 TYPES_EMPTY 400 The types field is empty
466 TYPE_CONSTRUCTOR_INVALID 400 The type constructor is invalid
467 Timedout -503 Timeout while fetching data
468 Timeout -503 Timeout while fetching data
469 UNKNOWN_ERROR 400
470 UNKNOWN_METHOD 500 The method you tried to call cannot be called on non-CDN DCs