From eed8326deb6c6e1ca99609b030b4f52cfa9da085 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Tue, 14 Sep 2021 12:34:28 +0200 Subject: [PATCH] Http, Heartbeat: Process status < 0 differently, report as "Invalid Response Code" --- src/Http.cpp | 1 + src/THeartbeatThread.cpp | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Http.cpp b/src/Http.cpp index 309b55d..cb06cab 100644 --- a/src/Http.cpp +++ b/src/Http.cpp @@ -210,6 +210,7 @@ std::string Http::POST(const std::string& host, const std::string& target, const // RFC 2616, RFC 7231 static std::map Map = { + { -1, "Invalid Response Code"}, { 100, "Continue" }, { 101, "Switching Protocols" }, { 102, "Processing" }, diff --git a/src/THeartbeatThread.cpp b/src/THeartbeatThread.cpp index 030fe8e..4a854e8 100644 --- a/src/THeartbeatThread.cpp +++ b/src/THeartbeatThread.cpp @@ -36,9 +36,6 @@ void THeartbeatThread::operator()() { Body += "&pps=" + Application::PPS(); auto SentryReportError = [&](const std::string& transaction, int status) { - if (status < 0) { - status = 0; - } auto Lock = Sentry.CreateExclusiveContext(); Sentry.SetContext("heartbeat", { { "response-body", T },