diff --git a/dist/setup/index.js b/dist/setup/index.js index b42c3c50..019693a5 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -100215,6 +100215,11 @@ class BaseDistribution { this.osPlat == 'win32') { return yield this.acquireWindowsNodeFromFallbackLocation(info.resolvedVersion, info.arch, info.downloadUrl); } + // Handle network-related issues (e.g., DNS resolution failures) + if (err instanceof Error && err.message.includes('getaddrinfo EAI_AGAIN')) { + core.error(`Network error: Failed to resolve the server at ${info.downloadUrl}. + This could be due to a DNS resolution issue. Please verify the URL or check your network connection.`); + } core.error(`Download failed from ${info.downloadUrl}. Please check the URl and try again.`); throw err; } diff --git a/src/distributions/base-distribution.ts b/src/distributions/base-distribution.ts index cc35ad7f..fcebaffc 100644 --- a/src/distributions/base-distribution.ts +++ b/src/distributions/base-distribution.ts @@ -183,6 +183,13 @@ export default abstract class BaseDistribution { info.downloadUrl ); } + // Handle network-related issues (e.g., DNS resolution failures) + if (err instanceof Error && err.message.includes('getaddrinfo EAI_AGAIN')) { + core.error( + `Network error: Failed to resolve the server at ${info.downloadUrl}. + This could be due to a DNS resolution issue. Please verify the URL or check your network connection.` + ); + } core.error( `Download failed from ${info.downloadUrl}. Please check the URl and try again.` );