fix(server): should use error instance stack (#11392)

This commit is contained in:
fengmk2
2025-04-02 07:12:18 +00:00
parent 36b1ca4327
commit e125b2a7c0

View File

@@ -116,8 +116,8 @@ export class UserFriendlyError extends Error {
get stacktrace() {
return this.name === 'internal_server_error'
? ((this.cause as Error)?.stack ?? super.stack)
: super.stack;
? ((this.cause as Error)?.stack ?? this.stack)
: this.stack;
}
toJSON() {