Add additional debugging for failed GET and POST calls

main
Simon Quigley 6 days ago
parent 3c42ec0a64
commit 3fbb8e2d84

@ -268,7 +268,7 @@ std::optional<std::string> 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<std::string> 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;
}

Loading…
Cancel
Save