Skip to content

Commit

Permalink
fix(maven): gracefully handle EAI_AGAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Apr 28, 2020
1 parent 87d76c0 commit 7dd863f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/datasource/maven/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ function isPermissionsIssue(err: { statusCode: number }): boolean {

function isConnectionError(err: { code: string }): boolean {
return (
err.code === 'ERR_TLS_CERT_ALTNAME_INVALID' || err.code === 'ECONNREFUSED'
err.code === 'EAI_AGAIN' ||
err.code === 'ERR_TLS_CERT_ALTNAME_INVALID' ||
err.code === 'ECONNREFUSED'
);
}

Expand Down Expand Up @@ -83,7 +85,7 @@ export async function downloadHttpProtocol(
// istanbul ignore next
logger.debug({ failedUrl }, 'Unsupported host');
} else {
logger.warn({ failedUrl, err }, 'Unknown error');
logger.info({ failedUrl, err }, 'Unknown error');
}
return null;
}
Expand Down

0 comments on commit 7dd863f

Please sign in to comment.