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:
@@ -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: {} }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user