lib/fetcher-curl: Prefix fatal errors with full URL

Just include the whole URL that failed if libcurl failed with something
elementary like CURLE_COULDNT_CONNECT or CURLE_COULDNT_RESOLVE_HOST.

Closes: #1731

Closes: #1732
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2018-09-21 12:31:57 -04:00 committed by Atomic Bot
parent a88032a09e
commit 4aadbe2159
1 changed files with 3 additions and 4 deletions

View File

@ -322,13 +322,12 @@ check_multi_info (OstreeFetcher *fetcher)
{ {
/* Handle file not found */ /* Handle file not found */
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_FOUND, g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
"%s", "%s", curl_easy_strerror (curlres));
curl_easy_strerror (curlres));
} }
else else
{ {
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "[%u] %s", g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED,
curlres, "While fetching %s: [%u] %s", eff_url, curlres,
curl_easy_strerror (curlres)); curl_easy_strerror (curlres));
_ostree_fetcher_journal_failure (req->fetcher->remote_name, _ostree_fetcher_journal_failure (req->fetcher->remote_name,
eff_url, curl_easy_strerror (curlres)); eff_url, curl_easy_strerror (curlres));