Skip to content

Commit 3b1ed15

Browse files
committed
report/s3: display the body of the S3 request for unknown errors
1 parent 02f46de commit 3b1ed15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/report/s3.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ impl ReportWriter for S3Writer {
120120
continue;
121121
}
122122
r => {
123+
if let Err(::rusoto_s3::PutObjectError::Unknown(ref resp)) = r {
124+
error!("S3 request status: {}", resp.status);
125+
error!("S3 request body: {}", String::from_utf8_lossy(&resp.body));
126+
error!("S3 request headers: {:?}", resp.headers);
127+
}
123128
r.with_context(|_| format!("S3 failure to upload {:?}", path.as_ref()))?;
124129
return Ok(());
125130
}

0 commit comments

Comments
 (0)