diff --git a/lib/datasource/maven/index.js b/lib/datasource/maven/index.js index b14c11d052..484032f923 100644 --- a/lib/datasource/maven/index.js +++ b/lib/datasource/maven/index.js @@ -137,6 +137,9 @@ async function downloadHttpProtocol(pkgUrl) { } catch (err) { if (isNotFoundError(err)) { logger.debug(`Url not found ${pkgUrl}`); + } else if (isHostError(err)) { + // istanbul ignore next + logger.warn({ pkgUrl }, 'Cannot connect to maven host'); } else if (isPermissionsIssue(err)) { logger.warn( { pkgUrl }, @@ -165,6 +168,10 @@ function isTemporalError(err) { ); } +function isHostError(err) { + return err.code === 'ETIMEDOUT'; +} + function isNotFoundError(err) { return err.code === 'ENOTFOUND' || err.statusCode === 404; }