Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV-28209 feat: honor http code 429 and retry-after header #3

Merged
merged 4 commits into from
Nov 15, 2022

Conversation

loaiabdelhalim
Copy link
Contributor

No description provided.

$deferred->reject($exception);
}, function (Exception $reason) use ($request, $authToken, $attempt, $deferred) {
$responseCode = $reason->getCode();
$retryAfterExists = $reason->getResponse()->getHeaders()['retry-after'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use case insensitive matching.

The header name could be "Retry-After" or "RETRY-AFTER" or any case, all are valid headers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Please take a look

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loaiabdelhalim Tests seem to be failing now...

@abhijeetnarvekar abhijeetnarvekar merged commit 052b7d2 into main Nov 15, 2022
@abhijeetnarvekar abhijeetnarvekar deleted the DEV-28209 branch November 15, 2022 12:09
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.

2 participants