td icon indicating copy to clipboard operation
td copied to clipboard

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

Open cdxf opened this issue 1 year ago • 3 comments

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 avatar Jan 02 '25 12:01 cdxf

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?

cdxf avatar Jan 02 '25 13:01 cdxf

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 avatar Jan 02 '25 18:01 levlam

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

levlam avatar Jan 02 '25 18:01 levlam