Improve error handling for menu data fetching and update HTML structure: Enhance error logging in menuDataController, provide user-friendly error messages, and streamline the index.html file by adding new script references while removing an unused image.

This commit is contained in:
Torsten Schulz (local)
2026-04-08 08:06:13 +02:00
parent c390228ed9
commit cd60f37e93
93 changed files with 274 additions and 35 deletions

View File

@@ -6,7 +6,8 @@ exports.getMenuData = async (req, res) => {
const menuData = await fetchMenuData();
res.json(menuData);
} catch (error) {
res.status(500).send('Error fetching menu data');
console.error('getMenuData:', error);
res.status(500).json({ error: 'Menü konnte nicht geladen werden (Datenbank nicht erreichbar).' });
}
};