handle Rc == "0" case, add sentry info event

This commit is contained in:
Lion Kortlepel
2021-08-11 12:20:11 +02:00
committed by Lion
parent c77e2b3fd8
commit d1efebe068

View File

@@ -303,6 +303,12 @@ void TNetwork::Authentication(SOCKET TCPSock) {
Sentry.SetTransaction(Application::GetBackendUrlForAuth() + Target);
Sentry.Log(SENTRY_LEVEL_ERROR, "default", "auth: wrong backend response format");
return;
} else if (Rc == "0") {
auto Lock = Sentry.CreateExclusiveContext();
Sentry.SetExtra("response-body", Rc);
Sentry.SetExtra("key", RequestString);
Sentry.SetTransaction(Application::GetBackendUrlForAuth() + Target);
Sentry.Log(SENTRY_LEVEL_INFO, "default", "backend returned 0 instead of json");
}
if (AuthResponse["username"].IsString() && AuthResponse["roles"].IsString()