From 6c0bfe7c7499efcc949116c7025e341cb52ebf69 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Thu, 30 Jul 2026 04:53:46 +0200 Subject: [PATCH] Improved error handling --- src/engine/engine/strategy.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/engine/strategy.rs b/src/engine/engine/strategy.rs index 8f8f074..576dc68 100644 --- a/src/engine/engine/strategy.rs +++ b/src/engine/engine/strategy.rs @@ -33,7 +33,13 @@ impl StrategyEngine { let (strategy, strategy_manifest) = get_manifest( &strategy, &strategy.join("strategy.bash"), - &fs::read(strategy.join("strategy.toml")).await?, + &match fs::read(strategy.join("strategy.toml")).await { + Err(e) if e.kind() == tokio::io::ErrorKind::NotFound => Err(tokio::io::Error::new( + tokio::io::ErrorKind::NotFound, + format!("Unable to find strategy.toml for {strategy:?}: {}", e), + )), + v => v, + }?, )?; Ok(Self {