fix(core): include state in stop not-running error

Stop now reports the current env state when it is not running, to make the error actionable.
This commit is contained in:
Marco Allegretti 2026-02-25 19:02:33 +01:00
parent cf8ed5ba67
commit 598d07239e

View file

@ -500,7 +500,10 @@ impl Engine {
if meta.state != EnvState::Running {
return Err(CoreError::Runtime(
karapace_runtime::RuntimeError::NotRunning(env_id.to_owned()),
karapace_runtime::RuntimeError::NotRunning(format!(
"{} (state: {})",
env_id, meta.state
)),
));
}