fix(npm): retry datasource 5 times

This commit is contained in:
Rhys Arkins 2020-02-11 21:11:30 +01:00
parent 80d9af9045
commit 3f1df39996

View file

@ -108,19 +108,7 @@ export async function getDependency(
try { try {
const raw = await got(pkgUrl, { const raw = await got(pkgUrl, {
json: true, json: true,
retry: { retry: 5,
errorCodes: [
'ECONNRESET',
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN',
],
},
headers, headers,
}); });
const res = raw.body; const res = raw.body;