diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index efe8c692b33895a667b9d4c372bc3acb7dfabac1..2cb7f7e94529b43a45a5eb5d5b8d887c219657f5 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -164,11 +164,14 @@ async function initRepo({ await config.storage.initRepo(config); } await Promise.all([getPrList(), getFileList()]); - } catch (err) { + } catch (err) /* istanbul ignore next */ { logger.debug('Caught initRepo error'); if (err.message === 'archived') { throw err; } + if (err.statusCode === 403) { + throw new Error('forbidden'); + } logger.info({ err }, 'Unknown GitLab initRepo error'); throw err; }