fehlermeldungen gebaut

This commit is contained in:
ecki
2026-04-05 18:15:53 +02:00
parent 80b96319ee
commit 8aa85d47a7
8 changed files with 76 additions and 35 deletions
+8
View File
@@ -60,3 +60,11 @@ error: err.message || "Internal Server Error"
app.listen(3000, () => {
console.log("ResMan running on port 3000");
});
app.use((err, req, res, next) => {
console.error("GLOBAL ERROR:", err)
res.status(500).json({
error: "Interner Serverfehler"
})
})