Skip to content

Commit

Permalink
Handle FileReferenceExpiredError during download
Browse files Browse the repository at this point in the history
May fix #4341.
  • Loading branch information
Lonami committed Apr 2, 2024
1 parent 9f3e7e4 commit 26aa178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telethon/client/downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async def _request(self):
self._exported = True
return await self._request()

except errors.FilerefUpgradeNeededError as e:
except (errors.FilerefUpgradeNeededError, errors.FileReferenceExpiredError) as e:
# Only implemented for documents which are the ones that may take that long to download
if not self._msg_data \
or not isinstance(self.request.location, types.InputDocumentFileLocation) \
Expand Down

0 comments on commit 26aa178

Please sign in to comment.