Commit 8f86cd9
committed
fix: verifier retry logic
Adjust the logic retry logic in the Pact Verifier 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 large increase.
Also took the opportunity to upgrade reqwest to 0.13.
Signed-off-by: JP-Ellis <josh@jpellis.me>1 parent 9f10078 commit 8f86cd9
4 files changed
Lines changed: 359 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments