Skip to content

Commit

Permalink
Expand err
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Feb 16, 2024
1 parent 055ff54 commit b752cc9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit b752cc9

Please sign in to comment.