Skip to content

Commit 51c846f

Browse files
committed
Prevent HTTP errors from bubbling up
Ref: #3
1 parent 259a6c9 commit 51c846f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/download-helper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ function fetchChecksums() {
2121
const newChecksums = [];
2222

2323
const downloads = editions.map(edition => {
24-
return new Promise(resolve => {
24+
return new Promise((resolve, reject) => {
2525
https.get(edition.checksumURL, res => {
2626
let checksum = '';
27+
res.on('error', error => {
28+
reject(error);
29+
});
2730
res.on('data', chunk => {
2831
checksum += chunk.toString();
2932
});

0 commit comments

Comments
 (0)