Skip to content

fix: retry logic - #83

Merged
JP-Ellis merged 2 commits into
masterfrom
fix/retry-logic
Jun 1, 2026
Merged

fix: retry logic#83
JP-Ellis merged 2 commits into
masterfrom
fix/retry-logic

Conversation

@JP-Ellis

@JP-Ellis JP-Ellis commented May 26, 2026

Copy link
Copy Markdown
Member

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.

Note

This pulls in the pact_verifier and relies on the changes in pact-foundation/pact-reference#533 being published to crates.io.

@JP-Ellis JP-Ellis self-assigned this May 26, 2026
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>
@JP-Ellis
JP-Ellis marked this pull request as draft May 26, 2026 07:36
Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis
JP-Ellis marked this pull request as ready for review June 1, 2026 23:18
@JP-Ellis
JP-Ellis merged commit 76fa3a4 into master Jun 1, 2026
10 checks passed
@JP-Ellis
JP-Ellis deleted the fix/retry-logic branch June 1, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant