From 8f87433719c58c60df4cb514e9e0eb215fb65158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Tue, 13 Jun 2017 12:23:08 +0200 Subject: [PATCH] HttpRequest: Log response body on failure --- Source/Core/Common/HttpRequest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/HttpRequest.cpp b/Source/Core/Common/HttpRequest.cpp index 68b5036ee9..0f4c1695d1 100644 --- a/Source/Core/Common/HttpRequest.cpp +++ b/Source/Core/Common/HttpRequest.cpp @@ -111,7 +111,8 @@ HttpRequest::Response HttpRequest::Impl::Fetch(const std::string& url, Method me curl_easy_getinfo(m_curl.get(), CURLINFO_RESPONSE_CODE, &response_code); if (response_code != 200) { - ERROR_LOG(COMMON, "Failed to %s %s: response code was %li", type, url.c_str(), response_code); + ERROR_LOG(COMMON, "Failed to %s %s: server replied with code %li and body\n\x1b[0m%s", type, + url.c_str(), response_code, buffer.data()); return {}; }