mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 10:18:30 +00:00
Error handling changed, 'auto' keyword used for MTP types.
All errors that lead to MTP request resending by default error handler now can be handled differently. For example inline bot requests are not being resent on 5XX error codes. + extensive use of auto keyword in MTP types handling.
This commit is contained in:
@@ -307,7 +307,7 @@ void FileUploader::partLoaded(const MTPBool &result, mtpRequestId requestId) {
|
||||
}
|
||||
|
||||
bool FileUploader::partFailed(const RPCError &error, mtpRequestId requestId) {
|
||||
if (mtpIsFlood(error)) return false;
|
||||
if (MTP::isDefaultHandledError(error)) return false;
|
||||
|
||||
if (requestsSent.constFind(requestId) != requestsSent.cend() || docRequestsSent.constFind(requestId) != docRequestsSent.cend()) { // failed to upload current file
|
||||
currentFailed();
|
||||
|
||||
Reference in New Issue
Block a user