diff --git a/backend/app.js b/backend/app.js index 6e5a3dd..95aeb65 100644 --- a/backend/app.js +++ b/backend/app.js @@ -87,8 +87,8 @@ app.use("/controller", routerController); // other controller-specific routes app.get("*", async function (req, res) { res.status(404).json({ error: "404 Not found" }); }); -app.use(async function (err, req, res) { - console.error(err.stack); // TODO: replace with production logger +app.use(function (err, req, res, next) { + console.error(err.stack); res.status(500).json({ error: "500 Internal server error" }); });