Honour Retry-After before your own backoff
A 429 or a 503 often comes with a Retry-After header that says exactly how long the other side wants you to wait. Exponential backoff that ignores it hammers a service that told you what it needed.
const wait = Number(res.headers.get("retry-after")) * 1000 || backoff(attempt);Cap it, add jitter, and log when you hit it. A server that keeps sending it is telling you something about your traffic.
httpreliability