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

fetchTimeout cannot be disabled in retry middleware #161

Open
alex-statsig opened this issue May 10, 2024 · 0 comments
Open

fetchTimeout cannot be disabled in retry middleware #161

alex-statsig opened this issue May 10, 2024 · 0 comments

Comments

@alex-statsig
Copy link

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

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

No branches or pull requests

1 participant