chore(server): better internal error stack (#11009)

This commit is contained in:
forehalo
2025-03-19 16:41:56 +00:00
parent b3c6333694
commit b3a245f47a
4 changed files with 24 additions and 35 deletions

View File

@@ -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,