Skip to content
Open
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/agents/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,13 @@ async def _on_invoke_tool(ctx: ToolContext[Any], input: str) -> Any:
},
)
)
if _debug.DONT_LOG_TOOL_DATA:
logger.debug(f"Tool {schema.name} failed")
else:
logger.error(
f"Tool {schema.name} failed: {input} {e}",
exc_info=e,
)
return result

return FunctionTool(
Expand Down