Skip to content

Commit 483c0c4

Browse files
committed
fix(npm): catch errors
1 parent dd84f88 commit 483c0c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/npm.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export function validatePackageExists(pkgName) {
2424
return got(`${c.npmRootEndpoint}/${pkgName}`, {
2525
json: true,
2626
method: 'HEAD',
27-
}).then(response => response.statusCode === 200);
27+
})
28+
.then(response => response.statusCode === 200)
29+
.catch(() => false);
2830
}
2931

3032
export async function getDownloads(pkgs) {

0 commit comments

Comments
 (0)