From 90e09c8c2568033c63fd14d249d5a89f1d1ba247 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Tue, 14 Jun 2022 11:01:45 -0600 Subject: [PATCH] add "error_for_status" to static file downloads --- backend/src/install/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/install/mod.rs b/backend/src/install/mod.rs index 57feccce1..506b177a6 100644 --- a/backend/src/install/mod.rs +++ b/backend/src/install/mod.rs @@ -193,7 +193,8 @@ pub async fn install( Current::new().compat(), platforms::TARGET_ARCH, )) - .await?, + .await? + .error_for_status()?, ), &mut File::create(public_dir_path.join("LICENSE.md")).await?, ) @@ -211,7 +212,8 @@ pub async fn install( Current::new().compat(), platforms::TARGET_ARCH, )) - .await?, + .await? + .error_for_status()?, ), &mut File::create(public_dir_path.join("INSTRUCTIONS.md")).await?, ) @@ -229,7 +231,8 @@ pub async fn install( Current::new().compat(), platforms::TARGET_ARCH, )) - .await?, + .await? + .error_for_status()?, ), &mut File::create(public_dir_path.join(format!("icon.{}", icon_type))).await?, )