fix(server): convert error type to lower case (#10301)

This commit is contained in:
fengmk2
2025-02-20 03:04:21 +00:00
parent ba91b36cc3
commit e0b2b2b33c
2 changed files with 14 additions and 8 deletions

View File

@@ -104,7 +104,7 @@ export class UserFriendlyError extends Error {
static fromUserFriendlyErrorJSON(body: UserFriendlyError) {
return new UserFriendlyError(
body.type as UserFriendlyErrorBaseType,
body.type.toLowerCase() as UserFriendlyErrorBaseType,
body.name.toLowerCase() as keyof typeof USER_FRIENDLY_ERRORS,
body.message,
body.data