fabianonline / telegram_backup

Java app to download all your telegram data.
GNU General Public License v3.0
447 stars 91 forks source link

Error 500 of telegram api should not terminate the program #122

Open luckcolors opened 6 years ago

luckcolors commented 6 years ago

Hello! I've been using your tool and it seems it completely exits after the telegram apis returns an error 500, i think on this error it should just retry, (maybe implement some back-away logic). See the attached log.

500: RPC_MCGET_FAIL
        at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQueries(DefaultTelegramClient.kt:209)
        at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQueries$default(DefaultTelegramClient.kt:181)
        at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQueries(DefaultTelegramClient.kt:160)
        at com.github.badoualy.telegram.api.TelegramClient$DefaultImpls.executeRpcQuery(TelegramClient.kt:53)
        at com.github.badoualy.telegram.api.DefaultTelegramClient.executeRpcQuery(DefaultTelegramClient.kt:157)
        at com.github.badoualy.telegram.tl.api.TelegramApiWrapper.messagesGetMessages(TelegramApiWrapper.java:673)
        at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.kt:274)
        at de.fabianonline.telegram_backup.DownloadManager.downloadMessages$default(DownloadManager.kt:241)
        at de.fabianonline.telegram_backup.DownloadManager._downloadMessages(DownloadManager.kt:150)
        at de.fabianonline.telegram_backup.DownloadManager.downloadMessages(DownloadManager.kt:82)
        at de.fabianonline.telegram_backup.CommandLineController.<init>(CommandLineController.kt:135)
        at de.fabianonline.telegram_backup.CommandLineRunnerKt.main(CommandLineRunner.kt:41)

----- EXIT -----
luckcolors commented 6 years ago

Let me know if you need any extra info.