fix: propagate ValueError for empty tool arguments

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2025-02-24 13:27:18 +00:00
parent 3c41d3aa60
commit 2cf0b0c342

View File

@@ -204,6 +204,8 @@ class ToolUsage:
raise ValueError("Required arguments missing for tool")
arguments = calling.arguments
result = tool.invoke(input=arguments)
except ValueError as ve:
raise ve
except Exception as e:
self.on_tool_error(tool=tool, tool_calling=calling, e=e)
self._run_attempts += 1