Custom Tool not picking up tool failure
Call id: 7ccb1e13-b4b8-4c95-9c9e-9d9b7eeb54c2
As you can see, my assistant wrongly said the "request-complete" message even though the request failed.
we ended up getting a tool call result like this:
{
"name": "place_order",
"role": "tool_call_result",
"time": 1747689324398,
"result": "Error: Failed to add order (forced failure for testing)",
"metadata": {},
"toolCallId": "call_PkVjPULo9vPHH5Q8tIfNfLyg",
"secondsFromStart": 22.109
}
Is there a way to mark the request as failed? Is this tool call result not the right way to do it?
As you can see, my assistant wrongly said the "request-complete" message even though the request failed.
we ended up getting a tool call result like this:
{
"name": "place_order",
"role": "tool_call_result",
"time": 1747689324398,
"result": "Error: Failed to add order (forced failure for testing)",
"metadata": {},
"toolCallId": "call_PkVjPULo9vPHH5Q8tIfNfLyg",
"secondsFromStart": 22.109
}
Is there a way to mark the request as failed? Is this tool call result not the right way to do it?