stijn
04/26/2024, 10:29 AMvapi.on('message', ...)
so I haven't added an url or any properties to the function.
When I ask, "please launch a rocket", the function is called successfully but so far 100% of the time it is followed by "An unexpected error occurred." making the voice agent assume something went wrong (even tho the function was called fine).
Example transcript:
Hi. I'm a voice agent. How can I help?
Please launch a rocket
---> launch-rocket is called
"An unexpected error occurred."
Hold on a sec. It seems there was an error with launching the rocket. Is there anything else I can assist you with?
I can't figure out how to debug this, can someone point me in the right direction?Vapi Support
04/26/2024, 10:29 AMVapi Support
04/26/2024, 10:29 AMlaunch-rocket
in your case) is correctly recognized and processed by Vapi. The use of vapi.on('message', ...)
for intercepting function calls is correct as per the documentation for handling message events in the Vapi Web SDK [(1)]() .
2. Verifying any server-side application logic associated with the function call, if applicable. Although you haven't added a URL or properties to the function, ensuring that the expected response to Vapi (if any) is correctly structured might be relevant in different scenarios.
3. Reviewing Vapi's documentation for any related guidance on function call handling, error debugging, or specific configuration requirements that might impact the execution of function calls.
As the specific error handling and debugging guidance for "An unexpected error occurred." isn't directly covered in the available documentationVapi Support
04/26/2024, 10:29 AMVapi Support
04/26/2024, 10:43 AMSahil
04/26/2024, 12:56 PMVapi Support
04/30/2024, 9:14 AM