Improved error handling

This commit is contained in:
2026-07-30 04:53:46 +02:00
parent 87e3c2b964
commit 6c0bfe7c74
+7 -1
View File
@@ -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 {