mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
refactor: don’t warn for maven ECONNREFUSED
This commit is contained in:
parent
cc8e40265b
commit
5763eaa3ed
1 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,10 @@ function isPermissionsIssue(err) {
|
||||||
return err.statusCode === 401 || err.statusCode === 403;
|
return err.statusCode === 401 || err.statusCode === 403;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isConnectionError(err) {
|
||||||
|
return err.code === 'ECONNREFUSED';
|
||||||
|
}
|
||||||
|
|
||||||
async function downloadHttpProtocol(pkgUrl, hostType = 'maven') {
|
async function downloadHttpProtocol(pkgUrl, hostType = 'maven') {
|
||||||
let raw;
|
let raw;
|
||||||
try {
|
try {
|
||||||
|
@ -46,6 +50,9 @@ async function downloadHttpProtocol(pkgUrl, hostType = 'maven') {
|
||||||
if (isMavenCentral(pkgUrl)) {
|
if (isMavenCentral(pkgUrl)) {
|
||||||
throw new Error('registry-failure');
|
throw new Error('registry-failure');
|
||||||
}
|
}
|
||||||
|
} else if (isConnectionError(err)) {
|
||||||
|
// istanbul ignore next
|
||||||
|
logger.info({ pkgUrl }, 'Connection refused to maven registry');
|
||||||
} else {
|
} else {
|
||||||
logger.warn({ err }, `Unknown error requesting ${pkgUrl}`);
|
logger.warn({ err }, `Unknown error requesting ${pkgUrl}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue