mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
Sentry: add debug, remove wrong exception to sentry logging
This commit is contained in:
parent
ff3cbebac0
commit
b33b396089
@ -40,15 +40,16 @@ void THeartbeatThread::operator()() {
|
||||
T = Http::POST(Application::GetBackendHostname(), Target, {}, Body, false, &ResponseCode);
|
||||
|
||||
if (T.substr(0, 2) != "20" || ResponseCode != 200) {
|
||||
#if DEBUG
|
||||
debug("got " + T + " from backend");
|
||||
#endif // DEBUG
|
||||
auto SentryReportError = [&](const std::string& transaction, int status) {
|
||||
if (T != "YOU_SHALL_NOT_PASS") {
|
||||
auto Lock = Sentry.CreateExclusiveContext();
|
||||
Sentry.SetContext("heartbeat",
|
||||
{ { "response-body", T },
|
||||
{ "request-body", Body } });
|
||||
Sentry.SetTransaction(transaction);
|
||||
Sentry.Log(SentryLevel::Error, "default", "unexpected backend response (" + std::to_string(status) + ")");
|
||||
}
|
||||
};
|
||||
SentryReportError(Application::GetBackendHostname() + Target, ResponseCode);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user