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 aborting when onDownloadProgress throws an exception #301

Merged
merged 3 commits into from
Dec 19, 2020

Conversation

zqianem
Copy link
Contributor

@zqianem zqianem commented Nov 15, 2020

(See commit messages.)

For instance, the catch block in the example in the README would not catch the AbortError if an onDownloadProgress callback were passed to ky.

I'm not entirely sure about the Chromium bug. With the patches applied in my project that uses ky, I could get Firefox to throw an AbortError, so I suspect https://bugs.chromium.org/p/chromium/issues/detail?id=817687 is not fully fixed.

@sindresorhus sindresorhus changed the title Fix aborting with onDownloadProgress throws uncatchable exception Fix aborting with onDownloadProgress throws uncatchable exception Dec 19, 2020
@sholladay sholladay changed the title Fix aborting with onDownloadProgress throws uncatchable exception Fix aborting when onDownloadProgress throws an exception Dec 19, 2020
@sholladay
Copy link
Collaborator

LGTM. One nice thing about this is that we could now allow onDownloadProgress to be an async function.

@sholladay sholladay merged commit 87c94fd into sindresorhus:master Dec 19, 2020
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.

None yet

4 participants