From f432d403e724fd7c96a5d9be4a614095b5aa7a3c Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 31 Mar 2020 00:02:43 +0300 Subject: [PATCH] Remove logging of some expected errors. GitOrigin-RevId: 2a6e4704d57743da1dba740dc9333cc649c679ee --- td/telegram/MessagesManager.cpp | 4 +++- td/telegram/Td.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index a3e10ebd..55a82473 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -133,7 +133,9 @@ class GetAllDraftsQuery : public Td::ResultHandler { } void on_error(uint64 id, Status status) override { - LOG(ERROR) << "Receive error for GetAllDraftsQuery: " << status; + if (!G()->close_flag()) { + LOG(ERROR) << "Receive error for GetAllDraftsQuery: " << status; + } status.ignore(); } }; diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 81a80155..01b1f1c1 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -170,7 +170,9 @@ class GetNearestDcQuery : public Td::ResultHandler { } void on_error(uint64 id, Status status) override { - LOG(ERROR) << "GetNearestDc returned " << status; + if (!G()->close_flag() && status.message() != "BOT_METHOD_INVALID") { + LOG(ERROR) << "GetNearestDc returned " << status; + } promise_.set_error(std::move(status)); } };