From 5763eaa3ed60350bf3fce9798cf133628c1d399d Mon Sep 17 00:00:00 2001 From: Rhys Arkins Date: Sat, 1 Jun 2019 05:49:38 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20don=E2=80=99t=20warn=20for=20maven?= =?UTF-8?q?=20ECONNREFUSED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/datasource/maven/util.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/datasource/maven/util.js b/lib/datasource/maven/util.js index 53a4411746..880166869e 100644 --- a/lib/datasource/maven/util.js +++ b/lib/datasource/maven/util.js @@ -26,6 +26,10 @@ function isPermissionsIssue(err) { return err.statusCode === 401 || err.statusCode === 403; } +function isConnectionError(err) { + return err.code === 'ECONNREFUSED'; +} + async function downloadHttpProtocol(pkgUrl, hostType = 'maven') { let raw; try { @@ -46,6 +50,9 @@ async function downloadHttpProtocol(pkgUrl, hostType = 'maven') { if (isMavenCentral(pkgUrl)) { throw new Error('registry-failure'); } + } else if (isConnectionError(err)) { + // istanbul ignore next + logger.info({ pkgUrl }, 'Connection refused to maven registry'); } else { logger.warn({ err }, `Unknown error requesting ${pkgUrl}`); }