From 0024b711ea29e32044970d35445cef2ccd702f22 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Sat, 13 Dec 2025 22:44:30 -0500 Subject: [PATCH] fix for crash --- backend/controllers/systems.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/controllers/systems.js b/backend/controllers/systems.js index 7990bf9..70eee8f 100644 --- a/backend/controllers/systems.js +++ b/backend/controllers/systems.js @@ -153,6 +153,11 @@ exports.get_system_status = async function (req, res) { return element.shortName == shortName; }); + if (!system) { + res.status(404); + res.send("System not found"); + return; + } var now_string = new Date().toLocaleString(); var last_active_string = new Date(system.lastActive).toLocaleString(); var response = {