diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index 7b2e2df3e644822f4b497448b0afb8f0c52d5b2c..83147c58ad716fac7b43b7333f4df598ab531a6d 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -974,11 +974,17 @@ export async function getPrList(): Promise<Pr[]> { logger.trace('getPrList()'); if (!config.prList) { logger.debug('Retrieving PR list'); - const res = await api.get( - `repos/${config.parentRepo || - config.repository}/pulls?per_page=100&state=all`, - { paginate: true } - ); + let res; + try { + res = await api.get( + `repos/${config.parentRepo || + config.repository}/pulls?per_page=100&state=all`, + { paginate: true } + ); + } catch (err) /* istanbul ignore next */ { + logger.info({ err }, 'getPrList err'); + throw new Error('platform-failure'); + } config.prList = res.body.map( (pr: { number: number;