From 9736de335bef50b9a8539f3a90437a6b610a6b91 Mon Sep 17 00:00:00 2001 From: Rohan Date: Wed, 13 Nov 2024 16:27:48 +0530 Subject: [PATCH] error message changed --- bin/helpers/atsHelper.js | 6 +++++- bin/helpers/constants.js | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/helpers/atsHelper.js b/bin/helpers/atsHelper.js index 01e874ef..061816b0 100644 --- a/bin/helpers/atsHelper.js +++ b/bin/helpers/atsHelper.js @@ -69,7 +69,11 @@ exports.getTurboScaleGridDetails = async (bsConfig, args, rawArgs) => { responseData = {}; } if(resp.statusCode != 200) { - logger.warn(`Warn: Get Automate TurboScale Details Request failed with status code ${resp.statusCode}`); + if (responseData.message == Constants.validationMessages.GRID_NOT_FOUND) { + logger.error(`Error: Invalid grid name '${gridName}' specified.`); + } else { + logger.error(`Error:Failed to fetch turboscale grid details with response code ${resp.statusCode}`); + }; utils.sendUsageReport(bsConfig, args, responseData["error"], Constants.messageTypes.ERROR, 'get_ats_details_failed', null, rawArgs); resolve({}); } diff --git a/bin/helpers/constants.js b/bin/helpers/constants.js index 2b0e83bf..2d9e54a4 100644 --- a/bin/helpers/constants.js +++ b/bin/helpers/constants.js @@ -196,6 +196,7 @@ const validationMessages = { "You have specified '--record' flag but you've not provided the '--record-key' and we could not find any value in 'CYPRESS_RECORD_KEY' environment variable. Your record functionality on cypress.io dashboard might not work as it needs the key and projectId", NODE_VERSION_PARSING_ERROR: "We weren't able to successfully parse the specified nodeVersion. We will be using the default nodeVersion to run your tests.", + GRID_NOT_FOUND: "Not Found", }; const cliMessages = {