From 1d51a3521cbe893c009d31decb419402604097ae Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 17 May 2019 08:17:45 +0200 Subject: [PATCH] fix(packagist): throw registry-failure if timeout --- lib/datasource/packagist/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/datasource/packagist/index.js b/lib/datasource/packagist/index.js index 668e451d09..b6ff94a387 100644 --- a/lib/datasource/packagist/index.js +++ b/lib/datasource/packagist/index.js @@ -239,6 +239,10 @@ async function packageLookup(regUrl, name) { }); return null; } + if (err.code === 'ETIMEDOUT' && err.host === 'packagist.org') { + logger.info('Packagist.org timeout'); + throw new Error('registry-failure'); + } logger.warn({ err, name }, 'packagist registry failure: Unknown error'); return null; } -- GitLab