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

[fetch] Support Retry-After response header #210

Open
Gudahtt opened this issue Jun 15, 2023 · 0 comments
Open

[fetch] Support Retry-After response header #210

Gudahtt opened this issue Jun 15, 2023 · 0 comments

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Jun 15, 2023

Update the retry logic to look for the Retry-After header, and respect the suggested wait time if one is provided.

We should also setting a max wait time, so that the request will fail rather than waiting an inordinate amount of time. A decent max setting might be between 30 seconds to 10 minutes - somewhere in that range. If we wait too long, it becomes increasingly likely that the user may have moved on from the page/operation/etc. that triggered the request (especially considering that we don't yet support cancellation; see #208)

For longer wait periods caused by rate limiting, returning an error explaining the delay would be preferable to the request hanging for an hour or longer. That way we can explain the delay to the user directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant