https://retellai.com/?utm_source=discord&utm_medium=seo logo
does speak_after_execution still work when the HTT...
# ❓・ai-evy-support
w
@AI Evy does speak_after_execution still work when the HTTP status of a function call is 500?
a
Thanks for tagging me @weronika. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available documentation, the behavior of
speak_after_execution
when a custom function returns an HTTP 500 status is not explicitly documented [(1) ]() . The documentation specifies that for custom functions, the response should have a status code between 200-299 to indicate success of the HTTP request . When a request fails, it will be retried up to 2 times . However, the documentation does not explicitly state whether
speak_after_execution
still triggers after a 500 error or how the agent behaves in this failure scenario. For general function execution behavior,
speak_after_execution
determines whether the agent would keep talking or perform other actions after the function call is completed . The documentation notes that both Speak During Execution and Speak After Execution are
Prompt
based, meaning the LLM will generate the message based on the configuration and the conversation . I don't have specific information about the agent's behavior when
speak_after_execution
is enabled but the function returns a 500 error. You might want to test this scenario or reach out to support for clarification on error handling behavior.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.