diff --git a/lib/github.js b/lib/github.js index 36827de..b0f7799 100644 --- a/lib/github.js +++ b/lib/github.js @@ -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