record user ID in API error logger, matching sentry

This commit is contained in:
Hazelnoot 2025-05-25 13:20:01 -04:00
parent d23d7f1e0b
commit 3e9ca84347

View file

@ -103,6 +103,7 @@ export class ApiCallService implements OnApplicationShutdown {
const errId = randomUUID();
this.logger.error(`Internal error occurred in ${ep.name}: ${renderInlineError(err)}`, {
ep: ep.name,
user: userId ?? '<unauthenticated>',
e: {
message: err.message,
code: err.name,