From d2ec5aaacf7c3add9111621042b9389495c9fdec Mon Sep 17 00:00:00 2001 From: BathreeNode <101283333+batuhankocyigit@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:57:47 +0300 Subject: [PATCH] fix(registry): preserve full traceback on tool dispatch errors logger.error() only records the exception message string, silently discarding the stack trace. Switch to logger.exception() which automatically appends the full traceback to the log output. Without this change, when a tool handler raises an unexpected error the log shows only the exception type and message, making it impossible to determine which line caused the failure or trace through nested calls. --- tools/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/registry.py b/tools/registry.py index 5605f319e..7d73bb4fb 100644 --- a/tools/registry.py +++ b/tools/registry.py @@ -125,7 +125,7 @@ class ToolRegistry: return _run_async(entry.handler(args, **kwargs)) return entry.handler(args, **kwargs) except Exception as e: - logger.error("Tool %s dispatch error: %s", name, e) + logger.exception("Tool %s dispatch error: %s", name, e) return json.dumps({"error": f"Tool execution failed: {type(e).__name__}: {e}"}) # ------------------------------------------------------------------