Skip to content
Snippets Groups Projects
Commit 0625166f authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon:
Browse files

fix: used to return incorrect error in case plugin disappears during enable plugin operation

parent 492bbb08
No related branches found
No related tags found
1 merge request!1218return errors from governor to client
......@@ -759,11 +759,9 @@ pub fn enable_plugin(
index = node.wait_index(index + 1, deadline.duration_since(Instant::now_fiber()))?;
}
let plugin = node
.storage
.plugins
.get(plugin)?
.ok_or(PluginError::EnablingAborted)?;
let Some(plugin) = node.storage.plugins.get(plugin)? else {
return Err(PluginError::PluginNotFound(plugin.clone()).into());
};
if !plugin.enabled {
return Err(PluginError::EnablingAborted.into());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment