Skip to content

Commit 5d9995a

Browse files
add debugging logs
1 parent c04573d commit 5d9995a

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/smartui-cli",
3-
"version": "4.1.23",
3+
"version": "4.1.24",
44
"description": "A command line interface (CLI) to run SmartUI tests on LambdaTest",
55
"files": [
66
"dist/**/*"

src/commander/ping.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ command
3434
console.error(chalk.red('Error: SmartUI server did not respond in 15 seconds'));
3535
} else {
3636
console.error(chalk.red('SmartUI server is not running'));
37-
console.error(chalk.red(`Error: ${error.message}`));
37+
console.error(chalk.red(`Error: ${error?.code}`));
38+
console.error(error);
3839
}
3940
}
4041
});

src/commander/pingTest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ function makeHttpRequest(url: string, timeout: number): Promise<{ status: number
3737
});
3838

3939
req.on('error', (error) => {
40+
console.log(error)
4041
reject(error);
4142
});
4243

@@ -65,6 +66,8 @@ command
6566
// Send GET request to the /ping endpoint
6667
const response = await makeHttpRequest(`${serverAddress}/ping`, 15000);
6768

69+
console.log("hello : "+ response)
70+
6871
// Log the response from the server
6972
if (response.status === 200) {
7073
console.log(chalk.green('SmartUI Server is running'));
@@ -78,6 +81,8 @@ command
7881
console.error(chalk.red('Error: SmartUI server did not respond in 15 seconds'));
7982
} else {
8083
console.error(chalk.red('SmartUI server is not running'));
84+
console.error(chalk.red(`Error: ${error?.code}`));
85+
console.error(error);
8186
}
8287
}
8388
});

0 commit comments

Comments
 (0)