Yo, thanks for all the replies! Didn’t expect so many good tips.
Tried the `tenacity` lib and it’s *so* much cleaner than my janky loop. Also, the `Retry-After` header tip saved me—turns out the API I’m using actually sends that.
One follow-up: How do you guys handle *non*-429 errors? Like, if the server’s just slow, do you still use backoff? Or is that overkill?
(Also, big shoutout to the person who mentioned jitter—never thought about that.)
🚀
Tried the `tenacity` lib and it’s *so* much cleaner than my janky loop. Also, the `Retry-After` header tip saved me—turns out the API I’m using actually sends that.
One follow-up: How do you guys handle *non*-429 errors? Like, if the server’s just slow, do you still use backoff? Or is that overkill?
(Also, big shoutout to the person who mentioned jitter—never thought about that.)
🚀
