diff --git a/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx b/apps/meteor/client/views/admin/ABAC/ABACAttributesTab/AttributesContextualBar.tsx index 0285afa82f787..7e0971a421097 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 d8be192dacc1d..6345d19291c97 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",