From b752cc9e787efe364c5acfeeae527fe987507ca7 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Fri, 16 Feb 2024 23:26:32 +0700 Subject: [PATCH] Expand err --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ad5cfb1..a2d150d 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,12 @@ app.use('/virtualmin', virtualmin()); app.use(function (err, req, res, next) { if (err instanceof Error) { res.status(500); - res.json(err); + res.json({ + stack: err.stack, + name: err.name, + message: err.message, + ...err, + }); } else { res.status(403); res.json(err);