diff --git a/index.js b/index.js index f71230e..62345b5 100644 --- a/index.js +++ b/index.js @@ -787,7 +787,7 @@ app.all("*", async (req, res) => { } catch (e) { const error = e.stack ? `${e}\n\n${e.stack}` : `${e}`; model.createLog(db, structure.id, route.id, error, true); - return res.send(error); + return res.status(500).send(error); } } else { res.status(404).json({ success: false, message: "Path not found" });