mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-20 06:02:33 +02:00
Improve error message
Co-authored-by: Nelson Chan <3271800+chakflying@users.noreply.github.com>
This commit is contained in:
parent
ec7d0edc95
commit
546afad73c
1 changed files with 2 additions and 1 deletions
|
@ -56,8 +56,9 @@ class TCPMonitorType extends MonitorType {
|
|||
heartbeat.msg = "Certificate is invalid";
|
||||
}
|
||||
} catch (error) {
|
||||
const message = error instanceof Error ? error.message : "Unknown error";
|
||||
heartbeat.status = DOWN;
|
||||
heartbeat.msg = "Connection failed";
|
||||
heartbeat.msg = `TLS Connection failed: ${message}`;
|
||||
} finally {
|
||||
if (socket && !socket.destroyed) {
|
||||
socket.end();
|
||||
|
|
Loading…
Add table
Reference in a new issue