3 ms·
if exception.message=="Capacity Error": sleep(x) x=x*2 continue
by nodemaker 14y ago
if exception.message=="Capacity Error":
sleep(x)
x=x*2
continue
- mittermayr 14y agowell, I do back off for a bit once I hit rate limits or the request times out. but regardless, I lost an API call credit.
- bonzoesc 14y agoYou don't lose a credit when you get rate limited.
- mittermayr 14y agoyeah, but i don't even go to rate limit (i check before every call). i stop 2 or 3 calls shy of it, so that doesn't limit me. but if I send an API request and that request times out and does not return data, then it still cost me a precious call (and one closer to rate limit).