diff --git a/backend/open_webui/utils/plugin.py b/backend/open_webui/utils/plugin.py index 2516f9e2cc..59fff1772d 100644 --- a/backend/open_webui/utils/plugin.py +++ b/backend/open_webui/utils/plugin.py @@ -276,7 +276,11 @@ async def load_tool_module_by_id(tool_id, content=None): if engine == 'monty': from open_webui.utils.tool_sandbox import load_sandboxed_tool - return await load_sandboxed_tool(tool_id, content) + try: + return await load_sandboxed_tool(tool_id, content) + except Exception as e: + log.error(f'Error loading module: {tool_id}: {e}') + raise # With the sandbox on, an unknown or empty engine must not fall back to exec. if engine is not None: raise RuntimeError(f'Unknown tool sandbox engine: {engine!r}')