diff --git a/package.json b/package.json index 7b03a36..125f0e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lambdatest/smartui-cli", - "version": "4.1.23", + "version": "4.1.24", "description": "A command line interface (CLI) to run SmartUI tests on LambdaTest", "files": [ "dist/**/*" diff --git a/src/commander/ping.ts b/src/commander/ping.ts index 6253627..8e0a56d 100644 --- a/src/commander/ping.ts +++ b/src/commander/ping.ts @@ -34,7 +34,8 @@ command console.error(chalk.red('Error: SmartUI server did not respond in 15 seconds')); } else { console.error(chalk.red('SmartUI server is not running')); - console.error(chalk.red(`Error: ${error.message}`)); + console.error(chalk.red(`Error: ${error?.code}`)); + console.error(error); } } }); diff --git a/src/commander/pingTest.ts b/src/commander/pingTest.ts index a1aa563..c777a98 100644 --- a/src/commander/pingTest.ts +++ b/src/commander/pingTest.ts @@ -37,6 +37,7 @@ function makeHttpRequest(url: string, timeout: number): Promise<{ status: number }); req.on('error', (error) => { + console.error(error) reject(error); }); @@ -78,6 +79,8 @@ command console.error(chalk.red('Error: SmartUI server did not respond in 15 seconds')); } else { console.error(chalk.red('SmartUI server is not running')); + console.error(chalk.red(`Error: ${error?.code}`)); + console.error(error); } } });