Fix: Return minimal menu on error instead of 500

- Bei Fehler im menu() Endpunkt wird jetzt ein minimales Menü zurückgegeben
- Verhindert 500 Internal Server Error wenn Falukant-Tabelle nicht verfügbar
- Ermöglicht Benutzern weiterhin Zugriff auf Basis-Funktionen
This commit is contained in:
Torsten Schulz (local)
2025-10-20 21:12:16 +02:00
parent 2d430691ad
commit 56d85b091a

View File

@@ -364,7 +364,11 @@ class NavigationController {
res.status(200).json(filteredMenu);
} catch (error) {
console.error('Error fetching menu:', error);
res.status(500).json({ error: 'An error occurred while fetching the menu' });
// Return a minimal working menu instead of 500 error
res.status(200).json({
home: { path: "/", icon: "logo_mono.png" },
settings: { path: "/settings", icon: "settings16.png", children: {} }
});
}
}