From 0e4e1268acced852719468e10def3ba1cd0d834a Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Wed, 12 Aug 2020 16:56:06 +0300 Subject: [PATCH] Session: more aggressive debug for mtproto rpc errors GitOrigin-RevId: efe1b894349d6542c4483a1f72c555bd29ddebd6 --- td/telegram/net/Session.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/td/telegram/net/Session.cpp b/td/telegram/net/Session.cpp index 3f499f483..51912ccb5 100644 --- a/td/telegram/net/Session.cpp +++ b/td/telegram/net/Session.cpp @@ -766,8 +766,13 @@ void Session::on_message_result_error(uint64 id, int error_code, BufferSlice mes return; } - LOG(DEBUG) << "Session::on_message_result_error " << tag("id", id) << tag("error_code", error_code) - << tag("msg", message.as_slice()); + if (error_code < 0) { + LOG(WARNING) << "Session::on_message_result_error from mtproto " << tag("id", id) << tag("error_code", error_code) + << tag("msg", message.as_slice()); + } else { + LOG(DEBUG) << "Session::on_message_result_error " << tag("id", id) << tag("error_code", error_code) + << tag("msg", message.as_slice()); + } auto it = sent_queries_.find(id); if (it == sent_queries_.end()) { return;