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

Fix throwHttpErrors: false suppressing non-HTTP errors #334

Merged
merged 1 commit into from May 4, 2021

Conversation

sholladay
Copy link
Collaborator

Closes #246

This PR aims to fix some unintended behavior for people who use the throwHttpErrors: false option. Previously, if the method was retriable, all operational errors would be suppressed, including network errors and timeout errors, not just HTTP status code errors. Now, the option only suppresses errors of the ky.HTTPError class, which are thrown when a response is received with a non-2xx status code.

@sindresorhus sindresorhus merged commit eefcde5 into sindresorhus:main May 4, 2021
@sholladay sholladay deleted the no-suppress-timeouts branch May 4, 2021 05:23
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

Successfully merging this pull request may close these issues.

throwHttpErrors: false suppresses ky.TimeoutError
2 participants