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

is there a way to prevent HttpError when response is not in range #532

Closed
michelecocuccio opened this issue Sep 26, 2023 · 2 comments
Closed

Comments

@michelecocuccio
Copy link

michelecocuccio commented Sep 26, 2023

Hello, I am working with an external company that is still working on their api and at the moment it return some out of range status code, and I get the ERROR RangeError: Failed to construct 'Response': The status provided (0) is outside the range [200, 599].

Is there a way to disable / prevent this error? I tried with throwHttpErrors set to false but it does nothing. The thing is that in this way I can't test the entire flow of the app as I always get this error first and can't intercept any failed request etc...

Screenshot 2023-09-26 at 16 38 15
@sindresorhus
Copy link
Owner

The error is coming from your Fetch polyfill, not from Ky.

@michelecocuccio
Copy link
Author

The error is coming from your Fetch polyfill, not from Ky.

Sorry. My bad!

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

2 participants