From 9b22c691097c2a779d33bb438107a8c73371f700 Mon Sep 17 00:00:00 2001 From: MartinSchoeler Date: Fri, 26 Dec 2025 15:04:11 -0300 Subject: [PATCH 1/2] regression(ABAC): user friendly errors on attribute form --- .../ABAC/ABACAttributesTab/AttributesContextualBar.tsx | 8 ++++++-- packages/i18n/src/locales/en.i18n.json | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx index a41e7b6b87ca2..edcdeb092350b 100644 --- a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx +++ b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx @@ -71,8 +71,12 @@ const AttributesContextualBar = ({ attributeData, onClose }: AttributesContextua } onClose(); }, - onError: (error) => { - dispatchToastMessage({ type: 'error', message: error }); + onError: (error: { errorType: string, error: string }) => { + if (error.errorType === 'invalid-params') { + dispatchToastMessage({ type: 'error', message: t('ABAC_Invalid_attribute') }); + } else { + dispatchToastMessage({ type: 'error', message: error }); + } }, onSettled: () => { queryClient.invalidateQueries({ queryKey: ABACQueryKeys.roomAttributes.list() }); diff --git a/packages/i18n/src/locales/en.i18n.json b/packages/i18n/src/locales/en.i18n.json index 887eb27955fad..0d4afbd97f6b1 100644 --- a/packages/i18n/src/locales/en.i18n.json +++ b/packages/i18n/src/locales/en.i18n.json @@ -83,6 +83,7 @@ "ABAC_Managed_description": "Only compliant users have access to attribute-based access controlled rooms. Attributes determine room access.", "ABAC_Room_Attributes": "Room Attributes", "ABAC_Logs": "Logs", + "ABAC_Invalid_attribute": "Invalid characters in attribute name or values", "AI_Actions": "AI actions", "API": "API", "API_Add_Personal_Access_Token": "Add new Personal Access Token", From 9074c7ee49a180857e722f936c3d7e3684ce2310 Mon Sep 17 00:00:00 2001 From: MartinSchoeler Date: Fri, 26 Dec 2025 15:25:20 -0300 Subject: [PATCH 2/2] ts --- .../admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx index edcdeb092350b..08fcab204f5ac 100644 --- a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx +++ b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx @@ -71,7 +71,7 @@ const AttributesContextualBar = ({ attributeData, onClose }: AttributesContextua } onClose(); }, - onError: (error: { errorType: string, error: string }) => { + onError: (error: { errorType: string; error: string }) => { if (error.errorType === 'invalid-params') { dispatchToastMessage({ type: 'error', message: t('ABAC_Invalid_attribute') }); } else {