Skip to content
Snippets Groups Projects
Commit b5db28b2 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: propagate registry-failure errors to avoid config validation warnings

We don’t want npmjs 5xx errors to cause config validation Issues in repositories.

Closes #1388
parent 54d3a622
Branches
Tags v10.49.3
No related merge requests found
......@@ -41,6 +41,11 @@ async function resolveConfigPresets(inputConfig, existingPresets = []) {
error.validationError = `Preset package is missing a renovate-config entry (${preset})`;
} else if (err.message === 'preset not found') {
error.validationError = `Preset name not found within published preset config (${preset})`;
} else {
/* istanbul ignore next */ // eslint-disable-next-line
if (err.message === 'registry-failure') {
throw err;
}
}
logger.info('Throwing preset error');
throw error;
......
......@@ -32,6 +32,10 @@ async function handleError(config, err) {
logger.info({ error: err }, 'Repository has invalid config');
await raiseConfigWarningIssue(config, err);
return err.message;
} else if (err.message === 'registry-failure') {
logger.info('Registry error - skipping');
delete config.branchList; // eslint-disable-line no-param-reassign
return err.message;
}
// Swallow this error so that other repositories can be processed
logger.error({ err }, `Repository has unknown error`);
......
......@@ -17,6 +17,7 @@ describe('workers/repository/error', () => {
'no-package-files',
'loops>5',
'config-validation',
'registry-failure',
'archived',
'not-found',
];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment