mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
refactor(server): auto print full stack on logger.error (#10161)
This commit is contained in:
@@ -152,11 +152,7 @@ export class UserFriendlyError extends Error {
|
||||
if (debugInfo) {
|
||||
message += ` (${JSON.stringify(debugInfo)})`;
|
||||
}
|
||||
let stack = this.stack ?? '';
|
||||
if (this.cause) {
|
||||
stack += `\n\nCaused by:\n\n${(this.cause as any).stack ?? this.cause}`;
|
||||
}
|
||||
fn.call(logger, message, stack);
|
||||
fn.call(logger, message, this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user