From 57e6e984237d0eab1714bc5097dcab9d4a09d245 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Mon, 9 Aug 2021 15:52:52 +0200 Subject: [PATCH] Sentry: discern between auth.* and backend.* errors TNetwork: error for CheckBytes is now warn --- src/TNetwork.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TNetwork.cpp b/src/TNetwork.cpp index fcf8274..1ff7525 100644 --- a/src/TNetwork.cpp +++ b/src/TNetwork.cpp @@ -293,12 +293,12 @@ void TNetwork::Authentication(SOCKET TCPSock) { return; } - if (!AuthResponse.IsObject()) { + if (!AuthResponse.IsObject() && Rc != "0") { ClientKick(*Client, "Backend returned invalid auth response format."); error("Backend returned invalid auth response format. This should never happen."); Sentry.AddExtra("response", Rc); Sentry.AddExtra("key", RequestString); - Sentry.Log(SENTRY_LEVEL_ERROR, "default", "wrong backend response format"); + Sentry.Log(SENTRY_LEVEL_ERROR, "default", "auth: wrong backend response format"); return; } @@ -437,7 +437,7 @@ std::string TNetwork::TCPRcv(TClient& c) { Temp = recv(c.GetTCPSock(), &Data[BytesRcv], 4 - BytesRcv, 0); if (!CheckBytes(c, Temp)) { #ifdef DEBUG - error(std::string(__func__) + (": failed on CheckBytes in while(BytesRcv < 4)")); + warn(std::string(__func__) + (": failed on CheckBytes in while(BytesRcv < 4)")); #endif // DEBUG return ""; }