Error handling
Your account and developer keys are rate limited.
To prevent abuse of server side resources, we have to impose rate limits.
Thus, it is possible that your request may not succeed if you exceed your rate limit.
In the rare case that the service is scaling out, it is also possible you might encounter timeouts.
Therefore, it is always advisable to handle errors with appropriate logic to retry requests.
int num_retries = 3
for (int i=0;i<num_retries;i++)
{
try{
// your code
}
catch (ErrorAPI error)
{
if (error.retry_after > 0 )
{
// sleep
// continue
}
}
}