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

refactor: log npm 429 retries

parent 1210300d
No related merge requests found
......@@ -220,6 +220,9 @@ async function getDependency(name, retries = 5) {
throw new Error('registry-failure');
}
const retryAfter = err.headers['retry-after'] || 30;
logger.info(
`npm too many requests. retrying after ${retryAfter} seconds`
);
await delay(1000 * (retryAfter + 1));
return getDependency(name, retries - 1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment