diff --git a/src/server/Server.ts b/src/server/Server.ts index c01a942..e538385 100644 --- a/src/server/Server.ts +++ b/src/server/Server.ts @@ -488,7 +488,7 @@ class Server extends EventEmitter } 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) res.status(500).send('An internal error was encountered'); }