Solved! Go to Solution.
ya, don't do that. Don't use Apigee for that. Apigee does not include built-in retry. If you have a Load balancer configured in Apigee, you can configure it to retry. (You need multiple backbends in order for retry to work)
But don't build custom logic to do it yourself. If you want to retry, use something else. Maybe Envoy proxy, or something else.
It's generally a bad idea to do that within JavaScript callouts in Apigee.
There's a time limit enforce on JS callouts. you cannot just delay indefinitely.
Also, your sleep is a busy wait. Also not a good idea.
What problem are you trying to solve? There's probably a better way.
hi, the requirement is to Incorporate re-try mechanism in proxy when exception like 503, 401 occur. Retry 3 times before throwing error to the client system.
ya, don't do that. Don't use Apigee for that. Apigee does not include built-in retry. If you have a Load balancer configured in Apigee, you can configure it to retry. (You need multiple backbends in order for retry to work)
But don't build custom logic to do it yourself. If you want to retry, use something else. Maybe Envoy proxy, or something else.