Commit 21f0613
committed
fix: retry logic
Adjust the retry logic so that it:
- Retries on 5XX server errors, 429 Too Many Requests, and 408 Request
Timeout
- In the case of a 429, also parse the `Retry-After` header (if present)
for the delay
- Tweak the exponential retry delay from millisecond decades starting
from 1ms, to powers of 2 starting from 0.5s. It is unlikely that a 1ms
delay will resolve the issue, but also going from 1s to 10s to 100s
is quite a steep increase.
Also took the opportunity to upgrade reqwest to 0.13.
Signed-off-by: JP-Ellis <josh@jpellis.me>1 parent 79857e9 commit 21f0613
5 files changed
Lines changed: 1757 additions & 522 deletions
0 commit comments