diff --git a/server/monitor-types/system-service.js b/server/monitor-types/system-service.js index c88f765bd..9ed493e97 100644 --- a/server/monitor-types/system-service.js +++ b/server/monitor-types/system-service.js @@ -42,9 +42,7 @@ class SystemServiceMonitorType extends MonitorType { // SECURITY: Prevent Argument Injection // Only allow alphanumeric, dots, dashes, underscores, and @ if (!serviceName || !/^[a-zA-Z0-9._\-@]+$/.test(serviceName)) { - heartbeat.status = DOWN; - heartbeat.msg = "Invalid service name. Please use the internal Service Name (no spaces)."; - reject(new Error(heartbeat.msg)); + reject(new Error("Invalid service name. Please use the internal Service Name (no spaces).")); return; }