Http: Add Sentry error breadcrumbs on internal https POST errors

This commit is contained in:
Lion Kortlepel 2021-09-14 12:32:30 +02:00 committed by Lion
parent f632606d76
commit 6883c96d33

View File

@ -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";
}
}