From 3fbb8e2d84869013f49025c6ead2faa33a360e33 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 16 Dec 2024 18:47:33 -0600 Subject: [PATCH] Add additional debugging for failed GET and POST calls --- src/launchpad.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/launchpad.cpp b/src/launchpad.cpp index 4293a6f..73e2ae1 100644 --- a/src/launchpad.cpp +++ b/src/launchpad.cpp @@ -268,7 +268,7 @@ std::optional launchpad::api_get(const std::string& endpoint, const } if (http_code >= 400) { - std::cerr << "HTTP GET request failed with code: " << http_code << "\nResponse: " << readBuffer << std::endl; + std::cerr << "HTTP GET request to " << url << " with params " << params << " failed with code: " << http_code << "\nResponse: " << readBuffer << std::endl; return std::nullopt; } @@ -337,7 +337,7 @@ std::optional launchpad::api_post( } if (http_code >= 400) { - std::cerr << "HTTP POST request failed with code: " << http_code << "\nResponse: " << readBuffer << std::endl; + std::cerr << "HTTP POST request to " << url << " with params " << params << " failed with code: " << http_code << "\nResponse: " << readBuffer << std::endl; return std::nullopt; }