Skip to content

Commit ab5a017

Browse files
committed
Log error response bodies
1 parent 6c33242 commit ab5a017

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

collector/src/toolchain.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl SysrootDownload {
229229
let resp = reqwest::get(url)
230230
.await
231231
.map_err(|e| SysrootDownloadError::IO(e.into()))?;
232-
log::debug!("{}", resp.status());
232+
log::debug!("response status: {}", resp.status());
233233

234234
match resp.status() {
235235
s if s.is_success() => {
@@ -248,7 +248,10 @@ impl SysrootDownload {
248248
}
249249
}
250250
StatusCode::NOT_FOUND => {}
251-
_ => found_error_that_is_not_404 = true,
251+
_ => {
252+
log::error!("response body: {}", resp.text().await.unwrap_or_default());
253+
found_error_that_is_not_404 = true
254+
}
252255
}
253256
}
254257

0 commit comments

Comments
 (0)