From 76c59fb401b9eca5730c989735ad28a723d45a2a Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Fri, 11 Jun 2021 11:05:52 +0000 Subject: [PATCH] Log more info about failed file uploads --- Cargo.lock | 2 +- cli/src/main.rs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aefb0cac..05519867 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -885,7 +885,7 @@ dependencies = [ [[package]] name = "rivet-api-cloud" -version = "1.0.0" +version = "0.0.1" dependencies = [ "reqwest", "serde", diff --git a/cli/src/main.rs b/cli/src/main.rs index 4d942527..55804937 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -347,7 +347,12 @@ async fn upload_file( .body(body) .send() .await?; - ensure!(res.status().is_success(), "failed to upload file"); + ensure!( + res.status().is_success(), + "failed to upload file: {}\n{:?}", + res.status(), + res.text().await + ); let upload_time = start.elapsed(); println!(" Finished in {:.3}s", upload_time.as_secs_f64());