diff --git a/lib/verify.js b/lib/verify.js index 3bfb0baf..1d6c8e5e 100644 --- a/lib/verify.js +++ b/lib/verify.js @@ -59,9 +59,9 @@ module.exports = async (pluginConfig, context) => { errors.push(getError('EGLNOPERMISSION', {repoId})); } } catch (error) { - if (error.response.statusCode === 401) { + if (error.response && error.response.statusCode === 401) { errors.push(getError('EINVALIDGLTOKEN', {repoId})); - } else if (error.response.statusCode === 404) { + } else if (error.response && error.response.statusCode === 404) { errors.push(getError('EMISSINGREPO', {repoId})); } else { throw error;