Improve ToolOutputError message (#73)
Before this PR error message:  Updated error message: 
This commit is contained in:
parent
a3a662c6a2
commit
aabceae135
1 changed files with 5 additions and 1 deletions
|
|
@ -103,6 +103,10 @@ class ToolExecutor:
|
|||
output = output_model(**{"result": results})
|
||||
|
||||
except ValidationError as e:
|
||||
raise ToolOutputError(message="Error in output", developer_message=str(e)) from e
|
||||
raise ToolOutputError(
|
||||
message="Failed to serialize tool output",
|
||||
developer_message=f"Validation error occurred while serializing tool output: {e!s}. "
|
||||
f"Please ensure the tool's output matches the expected schema.",
|
||||
) from e
|
||||
|
||||
return output
|
||||
|
|
|
|||
Loading…
Reference in a new issue