File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,13 @@ namespace {
165165 curl_easy_setopt (h, CURLOPT_PROTOCOLS_STR, " https" );
166166 CURLcode res = curl_easy_perform (h);
167167
168- sua::Logger::debug (" curl_easy_perform ended with code = '{}'" , res);
168+ const auto curl_status_message = fmt::format (" curl_easy_perform ended with code = {} ({})" , res, curl_easy_strerror (res));
169+
170+ if (res == CURLE_OK) {
171+ sua::Logger::trace (curl_status_message);
172+ } else {
173+ sua::Logger::error (curl_status_message);
174+ }
169175
170176 long http_code = 0 ;
171177 curl_easy_getinfo (h, CURLINFO_RESPONSE_CODE, &http_code);
@@ -174,9 +180,7 @@ namespace {
174180
175181 sua::Logger::debug (" CURLINFO_RESPONSE_CODE = {}" , http_code);
176182 if (http_code != 200 ) {
177- auto e = curl_easy_strerror (res);
178- sua::Logger::error (e);
179- return std::make_tuple (sua::TechCode::DownloadFailed, e);
183+ return std::make_tuple (sua::TechCode::DownloadFailed, curl_easy_strerror (res));
180184 }
181185
182186 return std::make_tuple (sua::TechCode::OK, " " );
You can’t perform that action at this time.
0 commit comments