mirror of
https://github.com/jmagar/unraid-mcp.git
synced 2026-11-12 14:03:33 -08:00
refactor(guards): migrate array/keys/plugins to gate_destructive_action
Replace 7-11 line inline guard blocks in array.py, keys.py, and plugins.py with single await gate_destructive_action(...) calls. Also fix guards.py to raise unraid_mcp.core.exceptions.ToolError (project subclass) instead of fastmcp.exceptions.ToolError so pytest.raises catches it correctly in tests.
This commit is contained in:
1 parent
80d2dd39ee
commit
cdab970c12
4 files changed
+26
-30
No files matched your search
@@ -10,9 +10,8 @@ from typing import TYPE_CHECKING
|
||||
if TYPE_CHECKING:
|
||||
from fastmcp import Context
|
||||
|
||||
from fastmcp.exceptions import ToolError
|
||||
|
||||
from ..config.logging import logger
|
||||
from .exceptions import ToolError
|
||||
|
||||
|
||||
async def elicit_destructive_confirmation(
|
||||
|
||||
Reference in new issue
Block a user