mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
fix: propagate ValueError for empty tool arguments
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
@@ -204,6 +204,8 @@ class ToolUsage:
|
|||||||
raise ValueError("Required arguments missing for tool")
|
raise ValueError("Required arguments missing for tool")
|
||||||
arguments = calling.arguments
|
arguments = calling.arguments
|
||||||
result = tool.invoke(input=arguments)
|
result = tool.invoke(input=arguments)
|
||||||
|
except ValueError as ve:
|
||||||
|
raise ve
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.on_tool_error(tool=tool, tool_calling=calling, e=e)
|
self.on_tool_error(tool=tool, tool_calling=calling, e=e)
|
||||||
self._run_attempts += 1
|
self._run_attempts += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user