Skip to content

[fetch] Support Retry-After response header #210

@Gudahtt

Description

@Gudahtt

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions