build: abort download task on abnormal status code#100
Open
JLHwung wants to merge 1 commit into
Open
Conversation
JLHwung
commented
Jun 12, 2026
| 'https://unicode.org/Public/17.0.0/emoji/emoji-zwj-sequences.txt', | ||
| // Emoji_Test (not an official property) | ||
| 'emoji-test': 'https://www.unicode.org/Public/17.0.0/emoji/emoji-test.txt', | ||
| 'emoji-test': 'https://unicode.org/Public/17.0.0/emoji/emoji-test.txt', |
Contributor
Author
There was a problem hiding this comment.
This change is to avoid an extra DNS request to the www.unicode.org while we have already resolved unicode.org.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/guardto our own implementation becausewhen/guarddoes not abort the download queue when we throw a synchronous error. Thus thewhenpackage has been removed.