mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 05:24:18 +02:00
Merge pull request #413 from jbkoh/exception-logging-for-tools
logging stack trace for easier debugging
This commit is contained in:
commit
dc9688d3c6
1 changed files with 1 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ class Tool(BaseModel):
|
|||
|
||||
return _convert_to_content(result, serializer=self.serializer)
|
||||
except Exception as e:
|
||||
logger.exception(f"Tool {self.name} failed")
|
||||
raise ToolError(f"Error executing tool {self.name}: {e}") from e
|
||||
|
||||
def to_mcp_tool(self, **overrides: Any) -> MCPTool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue