mirror of
https://github.com/marcoallegretti/karapace.git
synced 2026-03-27 05:53:10 +00:00
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:
parent
cf8ed5ba67
commit
598d07239e
1 changed files with 4 additions and 1 deletions
|
|
@ -500,7 +500,10 @@ impl Engine {
|
||||||
|
|
||||||
if meta.state != EnvState::Running {
|
if meta.state != EnvState::Running {
|
||||||
return Err(CoreError::Runtime(
|
return Err(CoreError::Runtime(
|
||||||
karapace_runtime::RuntimeError::NotRunning(env_id.to_owned()),
|
karapace_runtime::RuntimeError::NotRunning(format!(
|
||||||
|
"{} (state: {})",
|
||||||
|
env_id, meta.state
|
||||||
|
)),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue