Skip to content

Commit

Permalink
fix(npm): catch errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Haroenv committed Jul 1, 2019
1 parent dd84f88 commit 483c0c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export function validatePackageExists(pkgName) {
return got(`${c.npmRootEndpoint}/${pkgName}`, {
json: true,
method: 'HEAD',
}).then(response => response.statusCode === 200);
})
.then(response => response.statusCode === 200)
.catch(() => false);
}

export async function getDownloads(pkgs) {
Expand Down

0 comments on commit 483c0c4

Please sign in to comment.