Ahmer
04/02/2026, 12:41 PMVapi Support Bot
04/02/2026, 12:42 PMresults array, even for errors. Here’s the correct format for an error response:
python
return {
"results": [
{
"toolCallId": tool_id,
"error": result_object.get('message', 'Failed to create attorney listing request'),
}
]
}, 200 # Always return HTTP 200
This will ensure errors are shown properly in the dashboard.
Reference: [Vapi custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)
Source:
- [Vapi custom tools troubleshooting](https://docs.vapi.ai/tools/custom-tools-troubleshooting)Ahmer
04/02/2026, 2:12 PMShaunak
04/02/2026, 4:23 PMShaunak
04/02/2026, 4:23 PMShaunak
04/02/2026, 4:27 PMShaunak
04/02/2026, 4:27 PMjs
{ "toolCallId": "...", "error": "your error message" }
Vapi processes it correctly, but in the dashboard the error message is shown under the result field. This is expected for now. The conversation history format (tool_call_result messages) does not include a separate error field, so any error text is mapped into result for display purposes.
Important notes:
• Your tool logic is working correctly - the assistant receives the error message properly.
• The dashboard display is cosmetic and does not affect tool behavior.
• Success responses will continue to appear normally under result.
We understand this can be a bit confusing, and we have an internal task open to improve how errors are represented in the dashboard.Ahmer
04/03/2026, 10:55 AMShaunak
04/03/2026, 1:42 PMShaunak
04/03/2026, 1:43 PM