fix(server): websocket error backward compatibility (#7346)

This commit is contained in:
forehalo
2024-06-26 12:22:33 +00:00
parent 6f9a4bb01a
commit bd9cb41f8a
3 changed files with 24 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ export class UserFriendlyError extends Error {
this.data = args;
}
json() {
toJSON() {
return {
status: this.status,
code: STATUS_CODES[this.status] ?? 'BAD REQUEST',