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

logs: log npm registry failure codes

parent d0dae997
No related branches found
No related tags found
No related merge requests found
......@@ -223,7 +223,16 @@ export async function getDependency(
return null;
}
if (regUrl.startsWith('https://registry.npmjs.org')) {
logger.warn({ err, regUrl, depName: name }, 'npm registry failure');
logger.warn(
{
err,
errorCodes: err.gotOptions?.retry?.errorCodes,
statusCodes: err.gotOptions?.retry?.statusCodes,
regUrl,
depName: name,
},
'npm registry failure'
);
throw new Error(DATASOURCE_FAILURE);
}
// istanbul ignore next
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment