]> git.proxmox.com Git - cargo.git/commitdiff
List URL in HTTP download failures
authorAlex Crichton <alex@alexcrichton.com>
Wed, 22 Aug 2018 16:18:58 +0000 (09:18 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 22 Aug 2018 16:18:58 +0000 (09:18 -0700)
Hopefully will help diagnose issues like #5924

src/cargo/sources/registry/remote.rs

index dfd6ad6b019119ffb7c2e8e4c1cce64ed1da83b1..63b0c3c11ff91a64e06871dde6295901aa0e658f 100644 (file)
@@ -263,7 +263,9 @@ impl<'cfg> RegistryData for RemoteRegistry<'cfg> {
                     body.extend_from_slice(buf);
                     Ok(buf.len())
                 })?;
-                handle.perform()?;
+                handle.perform().chain_err(|| {
+                    format!("failed to download from `{}`", url)
+                })?;
             }
             let code = handle.response_code()?;
             if code != 200 && code != 0 {