We have an endpoint in our API that we are using with Zapier that if it takes to long requires a retry after a few seconds. How could we implement this flow?
API Call Retry
Best answer by PaulKortman
Webhooks Best Practices | Stripe "If your webhook script performs complex logic, or makes network calls, it’s possible that the script would time out before Stripe sees its complete execution. Ideally, your webhook handler code (acknowledging receipt of an event by returning a 2xx status code) is separate of any other logic you do for that event."
Webhooks by Zapier - Integration Help & Support | Zapier "For High Availability and High Throughput reasons - we always return a success message with a payload of debugging information when collecting a webhook - regardless of whether there is a Zap behind the webhook or if it is paused or not. The only way to know if a URL is live is to visit the editor and look at the URL (which never changes for a Zap). There is no way to customize the response to the request you send to the Catch Hook URL, as the response is sent before the Zap triggers and runs on the webhook request."
I really think you need to change how your API handles requests. Even in these semi-rare situations.
But that aside, you can develop the javascript code to keep retrying, but if a specific api call will always take longer than 30 seconds it will never complete.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.