From a7c679e610b168c59465a94e632072dcb6053a08 Mon Sep 17 00:00:00 2001 From: "HRG @ SCExC" Date: Sun, 12 Jan 2025 11:02:03 -0500 Subject: [PATCH] fix: return 500 for exceptions --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" });