aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-tauri/src/northstar/install.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src-tauri/src/northstar/install.rs b/src-tauri/src/northstar/install.rs
index 344c0ccf..04c58630 100644
--- a/src-tauri/src/northstar/install.rs
+++ b/src-tauri/src/northstar/install.rs
@@ -113,7 +113,13 @@ pub async fn install_northstar(
northstar_package_name: String,
version_number: Option<String>,
) -> Result<String, String> {
- let index = thermite::api::get_package_index().unwrap().to_vec();
+ let index = match thermite::api::get_package_index() {
+ Ok(res) => res.to_vec(),
+ Err(err) => {
+ log::warn!("Failed fetching package index due to: {err}");
+ return Err("Failed to connect to Thunderstore.".to_string());
+ }
+ };
let nmod = index
.iter()
.find(|f| f.name.to_lowercase() == northstar_package_name.to_lowercase())