โ01-28-2021 04:03 PM
Hi, is there a simple way to build in exponential backoff when hit with a rate limit API error? The error handling step allows for retries, but there doesn't seem to be a way to set custom wait intervals in between tries.
Perhaps something that can be implemented with the new Wait step, but curious how others have tackled this.
Thanks!
โ01-28-2021 04:24 PM
The way we've implemented it was wrapping the whole in a for loop with a set number of attempts, and if the call passes, skip all the steps in the loop, but if it doesn't and it's the rate limit, start the wait.
โ01-28-2021 04:20 PM
It's very simple Jason Jho here is the random wait time in the specific interval - https://share.getcloudapp.com/GGu6XznD
โ01-28-2021 04:23 PM
Also, sometimes I use thing like that to pass the wait limit in seconds - https://share.getcloudapp.com/P8ukd7l2
โ01-29-2021 02:15 PM
Here is a related enhancement suggestion that I posted: https://support.workato.com/support/discussions/topics/1000100031
The suggestion to leverage a FOR EACH is a great one. We chose to build in retries to the error handling routine that gets called within the On Error to send notifications. We have configuration in a Lookup table for notification channel as well as these retries. If exponential retries are configured then we write the job to a Lookup table then leverage a recipe that runs every 5 minutes to re-run the job with Recipe Ops. This has worked well for systems with regular maintainence windows of 1-2 hours.
โ01-29-2021 07:07 PM
Have you tried using try catch blocks? The have retry logic built in to them..