When returning a 400 error in a tool call vapi is ...
# support
a
In a tool call I am purposely throwing and returning an error, because I have different behavior depending if the tool call was successful or not, so I return an error and a result so the bot can say the result, but just checked in the call logs, and it says I am not returning any result, which I am pretty sure I am according to logs.
FYI the tool is set to async: False
Call id: 2d8ac1e7-9ca7-4325-b037-fa678ab0674a
k
logs
🔵 22:39:15:050 Server Message Failed. (). Error: 🔵 22:39:15:052 \[user ERROR\] tool-calls Server URL Error: Request failed with status code 400 🔵 22:39:40:128 Server Message Failed. (). Error: 🔵 22:39:40:130 \[user ERROR\] status-update Server URL Error: Request failed with status code 400
Hey alep, your server is returning 400 status code can you check in your server logs?
a
Yes, I am returning a 400 on purpose, but I just found out that to retrieve the result, we should always return 200. I have changed this logic—thanks.
This is solved