Compare commits

..

1 Commits

Author SHA1 Message Date
Chiranjib Swain
e55d70dab9
Merge 421e43bf5a into 1d018f9b8b 2026-03-24 17:25:47 +05:30
3 changed files with 9 additions and 11 deletions

View File

@ -356,9 +356,7 @@ describe('GraalVMDistribution', () => {
// Verify the error is thrown with the expected message
await expect(
(distribution as any).findPackageForDownload('17.0.99')
).rejects.toThrow(
"No matching GraalVM version found for SemVer '17.0.99'. Available versions can be found at https://download.oracle.com/graalvm/. Pick a version from the list."
);
).rejects.toThrow("No matching version found for SemVer '17.0.99'");
// Verify the hint about checking the base URL is included
await expect(

7
dist/setup/index.js vendored
View File

@ -113217,9 +113217,10 @@ class GraalVMDistribution extends base_installer_1.JavaBase {
handleHttpResponse(response, range) {
const statusCode = response.message.statusCode;
if (statusCode === http_client_1.HttpCodes.NotFound) {
throw new Error(`No matching GraalVM version found for SemVer '${range}'.` +
` Available versions can be found at ${GRAALVM_DL_BASE}/.` +
` Pick a version from the list.`);
// Create the standard error with additional hint about checking the download URL
const error = this.createVersionNotFoundError(range);
error.message += `\nPlease check if this version is available at ${GRAALVM_DL_BASE}`;
throw error;
}
if (statusCode === http_client_1.HttpCodes.Unauthorized ||
statusCode === http_client_1.HttpCodes.Forbidden) {

View File

@ -149,11 +149,10 @@ export class GraalVMDistribution extends JavaBase {
const statusCode = response.message.statusCode;
if (statusCode === HttpCodes.NotFound) {
throw new Error(
`No matching GraalVM version found for SemVer '${range}'.` +
` Available versions can be found at ${GRAALVM_DL_BASE}/.` +
` Pick a version from the list.`
);
// Create the standard error with additional hint about checking the download URL
const error = this.createVersionNotFoundError(range);
error.message += `\nPlease check if this version is available at ${GRAALVM_DL_BASE}`;
throw error;
}
if (