mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-20 15:57:06 +08:00
chore(server): better internal error stack (#11009)
This commit is contained in:
@@ -114,6 +114,12 @@ export class UserFriendlyError extends Error {
|
||||
);
|
||||
}
|
||||
|
||||
get stacktrace() {
|
||||
return this.name === 'internal_server_error'
|
||||
? ((this.cause as Error)?.stack ?? super.stack)
|
||||
: super.stack;
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
return {
|
||||
status: this.status,
|
||||
|
||||
Reference in New Issue
Block a user