Skip to content

build: abort download task on abnormal status code#100

Merged
mathiasbynens merged 1 commit into
node-unicode:mainfrom
JLHwung:guard-resource-fetch-status-code
Jun 13, 2026
Merged

build: abort download task on abnormal status code#100
mathiasbynens merged 1 commit into
node-unicode:mainfrom
JLHwung:guard-resource-fetch-status-code

Conversation

@JLHwung

@JLHwung JLHwung commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

In this PR we abort the download task when the status code is not 2XX.

This guard would be helpful if we made a typo in the resource URL or the URL has moved, and avoid issues such as 89e716d.

We also replaced when/guard to our own implementation because when/guard does not abort the download queue when we throw a synchronous error. Thus the when package has been removed.

Comment thread data/resources.js
@mathiasbynens mathiasbynens merged commit 6602f3b into node-unicode:main Jun 13, 2026
1 check passed
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.

2 participants