mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-06-17 22:23:03 +00:00
Sentry: discern between auth.* and backend.* errors
TNetwork: error for CheckBytes is now warn
This commit is contained in:
+3
-3
@@ -293,12 +293,12 @@ void TNetwork::Authentication(SOCKET TCPSock) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AuthResponse.IsObject()) {
|
if (!AuthResponse.IsObject() && Rc != "0") {
|
||||||
ClientKick(*Client, "Backend returned invalid auth response format.");
|
ClientKick(*Client, "Backend returned invalid auth response format.");
|
||||||
error("Backend returned invalid auth response format. This should never happen.");
|
error("Backend returned invalid auth response format. This should never happen.");
|
||||||
Sentry.AddExtra("response", Rc);
|
Sentry.AddExtra("response", Rc);
|
||||||
Sentry.AddExtra("key", RequestString);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,7 +437,7 @@ std::string TNetwork::TCPRcv(TClient& c) {
|
|||||||
Temp = recv(c.GetTCPSock(), &Data[BytesRcv], 4 - BytesRcv, 0);
|
Temp = recv(c.GetTCPSock(), &Data[BytesRcv], 4 - BytesRcv, 0);
|
||||||
if (!CheckBytes(c, Temp)) {
|
if (!CheckBytes(c, Temp)) {
|
||||||
#ifdef DEBUG
|
#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
|
#endif // DEBUG
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user