https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'm trynna test my agent workflow, yet i get this ...
# ❓・ai-evy-support
s
@AI Evy I'm trynna test my agent workflow, yet i get this error message over and over; "Tool Result tool_call_id: tool_call_f212ee Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 404 response status: 404 response data: [{"status":"1","timestamp":"2","path":"3","error":"4"},"error","2025-11-20T22:27:24.526Z","/v2/slots?start=2025-11-22T:00.000Z&end=2025-11-22T:00.000Z&eventTypeId=3921834",{"code":"5","message":"6","details":"7"},"NotFoundException","Cannot GET /v2/slots?start=2025-11-22T:00.000Z&end=2025-11-22T:00.000Z&eventTypeId=3921834",{"message":"6","error":"8","statusCode":404},"Not Found"] "what is happening?
a
Thanks for tagging me @Salty. I'll look through relevant sources and get back to you shortly.
### Answer The 404 error you're seeing indicates that your custom function is trying to reach an endpoint (
/v2/slots
) that doesn't exist or isn't properly configured [(1) ]() . Based on the error path
/v2/slots?start=2025-11-22T:00.000Z&end=2025-11-22T:00.000Z&eventTypeId=3921834
, your custom function appears to be calling an external calendar/scheduling API, but the URL is malformed or incorrect . Common causes for custom function 404 errors: 1. Incorrect endpoint URL - Verify the URL you configured in your custom function matches your actual API endpoint 2. Missing base URL - The endpoint URL must be a valid, complete URL 3. Malformed query parameters - Your timestamp format shows
:00.000Z
which appears incomplete (should be like
T09:00:00.000Z
) To fix this: 1. Check your custom function configuration and verify the endpoint URL is correct and complete 2. Ensure your query parameters are properly formatted 3. Test the endpoint URL directly (outside of Retell) to confirm it works 4. Review your custom function's query parameter configuration to ensure dynamic variables are being inserted correctly To verify requests are from Retell, you can check the
X-Retell-Signature
header :
Copy code
javascript
import { Retell } from "retell-sdk";

this.app.post("/check-weather", async (req: Request, res: Response) => {
  if (
    !Retell.verify(
      JSON.stringify(req.body) ,
      process.env.RETELL_API_KEY,
      req.headers["x-retell-signature"] as string,
    )
  ) {
    console.error("Invalid signature") ;
    return;
  }
  const content = req.body;
  // Your logic here
}) ;
You can also secure your server by allowlisting Retell's IP address:
100.20.5.228
Double-check your custom function's endpoint URL configuration and query parameter formatting to resolve this 404 error .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.