Skip to content

fetchTimeout cannot be disabled in retry middleware #161

@alex-statsig

Description

@alex-statsig

I think there should be a setting to omit the fetchTimeout handling for retry middleware, only retrying for specified statuscodes instead. Reading some code it seemed like there was a case for handling a fetchTimeout value of 0 here to skip the fetch timeout logic entirely. However, providing a fetchTimeout: 0 actually gets overridden here by the || 15000 (rather than ?? 15000).

I can set this value arbitrarily high to avoid the timeout still, but it feels like there should be a more direct way to do that (avoiding the extra setTimeout, and just being cleaner). I think supporting a fetchTimeout value of 0 would be reasonable to handle this? If so, I can contribute a change for it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions