From 8ed2aa8d6dd70b1c32abd3e6f4c4d1a3edcdd434 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 16 Nov 2020 22:41:19 +0100 Subject: [PATCH] Make sure curl errors without message are shown as code, and add URL linked to the failure --- src/Composer/Util/Http/CurlDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/Http/CurlDownloader.php b/src/Composer/Util/Http/CurlDownloader.php index 8bdce78d6..5fe3a86fc 100644 --- a/src/Composer/Util/Http/CurlDownloader.php +++ b/src/Composer/Util/Http/CurlDownloader.php @@ -299,7 +299,7 @@ class CurlDownloader try { // TODO progress if (CURLE_OK !== $errno || $error) { - throw new TransportException($error); + throw new TransportException('curl error while downloading '.Url::sanitize($progress['url']).': '.($error ?: '#'.$errno)); } $statusCode = $progress['http_code'];