diff --git a/js/libs/ui-shared/src/user-profile/utils.ts b/js/libs/ui-shared/src/user-profile/utils.ts index 4009c66ae2..a86e760308 100644 --- a/js/libs/ui-shared/src/user-profile/utils.ts +++ b/js/libs/ui-shared/src/user-profile/utils.ts @@ -67,13 +67,16 @@ export function setUserProfileServerError( ).forEach((e) => { const params = Object.assign( {}, - e.params?.map((p) => t(isBundleKey(p.toString()) ? unWrap(p) : p)), + e.params?.map((p) => (isBundleKey(p.toString()) ? t(unWrap(p)) : p)), ); setError(fieldName(e.field) as keyof T, { - message: t(e.errorMessage, { - ...params, - defaultValue: e.errorMessage || e.field, - }), + message: t( + isBundleKey(e.errorMessage) ? unWrap(e.errorMessage) : e.errorMessage, + { + ...params, + defaultValue: e.errorMessage || e.field, + }, + ), type: "server", }); });