From 90c3aac0bc34a94efb9d418ae193ed50dd3da41c Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Tue, 14 Sep 2021 12:32:30 +0200 Subject: [PATCH] Http: Add Sentry error breadcrumbs on internal https POST errors --- src/Http.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Http.cpp b/src/Http.cpp index f9e452a..309b55d 100644 --- a/src/Http.cpp +++ b/src/Http.cpp @@ -127,6 +127,7 @@ std::string Http::POST(const std::string& host, const std::string& target, const bool ok = try_connect_with_protocol(tcp::v4()); if (!ok) { Application::Console().Write("[ERROR] failed to resolve or connect in POST " + host + target); + Sentry.AddErrorBreadcrumb("failed to resolve or connect to " + host + target, __FILE__, std::to_string(__LINE__)); // FIXME: this is ugly. return "-1"; } //} @@ -202,6 +203,7 @@ std::string Http::POST(const std::string& host, const std::string& target, const } catch (const std::exception& e) { Application::Console().Write(e.what()); + Sentry.AddErrorBreadcrumb(e.what(), __FILE__, std::to_string(__LINE__)); // FIXME: this is ugly. return "-1"; } }