This commit is contained in:
Erik 2024-01-17 19:29:11 +02:00
parent 8bb909367c
commit 5c0746f9b9

View File

@ -488,7 +488,7 @@ class Server extends EventEmitter
} }
else else
{ {
this.#logger.error(`Unhandled error on [${req.method}] ${req.route?.path || req.path}\nParams\n${inspect(req.params)}\nQuery\n${inspect(req.query)}\nBody\n${inspect(req.body)}\n${err.stack || err}`, { labels: [ req.user.name ] }); this.#logger.error(`Unhandled error on [${req.method}] ${req.route?.path || req.path}\nParams\n${inspect(req.params)}\nQuery\n${inspect(req.query)}\nBody\n${inspect(req.body)}\n${err.stack || err}`, { labels: [ req.user?.name ] });
if (!res.closed) if (!res.closed)
res.status(500).send('An internal error was encountered'); res.status(500).send('An internal error was encountered');
} }