From cc7fac46796d56fa446ea6e19e2471b1121d913b Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Thu, 30 Jan 2025 16:25:22 +0530 Subject: [PATCH] error --- dist/setup/index.js | 6 +++++- src/distributions/official_builds/official_builds.ts | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index ffd27daf..bac7fe81 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -100686,10 +100686,14 @@ class OfficialBuilds extends base_distribution_1.default { } catch (error) { if (error instanceof tc.HTTPError && error.httpStatusCode === 404) { - core.warning(`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` + + core.error(`Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` + 'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' + 'To resolve this issue you may either fall back to the older version or try again later.'); } + else { + // For any other error type, you can log the error message. + core.error(`An unexpected error occurred like url might not correct`); + } throw error; } }); diff --git a/src/distributions/official_builds/official_builds.ts b/src/distributions/official_builds/official_builds.ts index 1805cb9e..04ebba23 100644 --- a/src/distributions/official_builds/official_builds.ts +++ b/src/distributions/official_builds/official_builds.ts @@ -342,11 +342,14 @@ export default class OfficialBuilds extends BaseDistribution { return toolPath; } catch (error) { if (error instanceof tc.HTTPError && error.httpStatusCode === 404) { - core.warning( + core.error( `Node version ${this.nodeInfo.versionSpec} for platform ${this.osPlat} and architecture ${this.nodeInfo.arch} was found but failed to download. ` + - 'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' + - 'To resolve this issue you may either fall back to the older version or try again later.' + 'This usually happens when downloadable binaries are not fully updated at https://nodejs.org/. ' + + 'To resolve this issue you may either fall back to the older version or try again later.' ); + } else { + // For any other error type, you can log the error message. + core.error(`An unexpected error occurred like url might not correct`); } throw error;