mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 15:06:27 +00:00
refactor(maven): log host error separately
This commit is contained in:
parent
c3af5b1875
commit
46f2c58249
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue