Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to Download file 1(0) of type Document: [Error : 0 : FILE_DOWNLOAD_LIMIT] #3205

Open
cdxf opened this issue Jan 2, 2025 · 3 comments

Comments

@cdxf
Copy link

cdxf commented Jan 2, 2025

When I check the log, I get a lot of this message when trying to download a file:

Failed to Download file 1(0) of type Document: [Error : 0 : FILE_DOWNLOAD_LIMIT]

Even thought the file still download successfully.

Is it because I hit download limit? I don't see any Retry_after error. How to handle this case in my code?

@cdxf
Copy link
Author

cdxf commented Jan 2, 2025

I also found some error, what is it?

12:53:17.181 [Thread-985] ERROR com.tclient.TelegramClient - [ 2][t20][1735822397.181795835][NetQueryDelayer.cpp:102][#15][!NetQueryDelayer] Delay: [Query:[id:5189730305][tl:0xbe5335be]] [timeout:1][total_timeout:1] because of [Error : -503 : Timeout] from Session:5:download_small#0::Connect::TCP::[91.108.56.144:443] to DcId{5} from [...:45750]

And

[ 2][t10][1735822986.537912130][Session.cpp:665][#13][!Session:5:download_small#1] Session connection with 2 pending requests was closed: [Error : 2 : Too many dropped packets [total_size:256KB]] Session:5:download_small#1::Connect::TCP::[91.108.56.125:443] to DcId{5} from [...:53678]

How can I detect this type of error from my application?

@levlam
Copy link
Contributor

levlam commented Jan 2, 2025

FILE_DOWNLOAD_LIMIT isn't an error. It means that you asked to download part of the file specifying limit parameter, and it was reached.

@levlam
Copy link
Contributor

levlam commented Jan 2, 2025

In any case you just need to handle updateFile updates to know the current state of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants