Skip to content

Commit

Permalink
logs: log npm registry failure codes
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 12, 2020
1 parent d0dae99 commit 0f47f1a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/datasource/npm/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f47f1a

Please sign in to comment.