We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7127d5d commit 20f0fd3Copy full SHA for 20f0fd3
1 file changed
src/run/uploader/upload.rs
@@ -78,7 +78,7 @@ async fn upload_archive_buffer(
78
archive_buffer: Vec<u8>,
79
archive_hash: &String,
80
) -> Result<()> {
81
- REQUEST_CLIENT
+ let response = REQUEST_CLIENT
82
.put(upload_data.upload_url.clone())
83
.header("Content-Type", "application/gzip")
84
.header("Content-Length", archive_buffer.len())
@@ -87,6 +87,17 @@ async fn upload_archive_buffer(
87
.send()
88
.await?;
89
90
+ if !response.status().is_success() {
91
+ let status = response.status();
92
+ let error_text = response.text().await?;
93
+ bail!(
94
+ "Failed to upload performance report: {}\n -> {} {}",
95
+ status,
96
+ style("Reason:").bold(),
97
+ style(error_text).red()
98
+ );
99
+ }
100
+
101
Ok(())
102
}
103
0 commit comments