fix: abort repository when lockfile error

This commit is contained in:
Rhys Arkins 2018-05-24 16:28:36 +02:00
parent be4745dc6c
commit 2610015467
3 changed files with 7 additions and 1 deletions

View file

@ -202,7 +202,9 @@ async function processBranch(branchConfig, packageFiles) {
}
if (err.message === 'lockfile-error') {
logger.info('Lock file error');
} else if (err.message !== 'registry-failure') {
throw err;
}
if (err.message !== 'registry-failure') {
logger.error({ err }, `Error updating branch: ${err.message}`);
}
// Don't throw here - we don't want to stop the other renovations

View file

@ -55,6 +55,9 @@ async function handleError(config, err) {
logger.warn('Rate limit exceeded - aborting');
delete config.branchList; // eslint-disable-line no-param-reassign
return err.message;
} else if (err.message === 'lockfile-error') {
delete config.branchList; // eslint-disable-line no-param-reassign
return err.message;
}
// Swallow this error so that other repositories can be processed
logger.error(

View file

@ -24,6 +24,7 @@ describe('workers/repository/error', () => {
'not-found',
'forbidden',
'rate-limit-exceeded',
'lockfile-error',
];
errors.forEach(err => {
it(`errors ${err}`, async () => {