feat(core): support one time password (#9798)

This commit is contained in:
forehalo
2025-01-22 07:33:09 +00:00
parent bf797c7a0c
commit 5828eb53b6
16 changed files with 362 additions and 131 deletions

View File

@@ -136,8 +136,12 @@ export class UserFriendlyError extends Error {
return;
}
new Logger(context).error(
'Internal server error',
const logger = new Logger(context);
const fn = this.status >= 500 ? logger.error : logger.log;
fn.call(
logger,
this.name,
this.cause ? ((this.cause as any).stack ?? this.cause) : this.stack
);
}