Skip to content

Commit

Permalink
Merge pull request #100 from pkgjs/fix-404
Browse files Browse the repository at this point in the history
  • Loading branch information
dominykas committed Jul 13, 2021
2 parents b0fb895 + 640f93b commit 014f2c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports.getPackageJson = async function getPackageJson (owner, repo) {
})
return (JSON.parse(resp.repository.object.text))
} catch (err) {
if (err.errors && err.errors[0].type === 'NOT_FOUND') {
if (err.status === 404) {
throw Error(`Could not find GitHub repository at https://www.github.com/${owner}/${repo}`)
} else {
throw err
Expand Down

0 comments on commit 014f2c8

Please sign in to comment.