fix(download): show full error context on download failure (#2163)

This commit is contained in:
boxbeam 2024-05-17 12:34:08 -04:00 committed by GitHub
parent 5fe6ca3b44
commit eb0b2644ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,7 +138,7 @@ impl HTTPSHandler {
.and_then(|r| r.error_for_status()) .and_then(|r| r.error_for_status())
.map_err(|e| DownloadError::HttpError { .map_err(|e| DownloadError::HttpError {
name: input.into(), name: input.into(),
code: e.status().unwrap_or_default().to_string(), code: e.to_string(),
})?; })?;
let total_size = downloaded + res.content_length().unwrap_or(0); let total_size = downloaded + res.content_length().unwrap_or(0);