chore: polish membership error messages

This commit is contained in:
Lukas Müllner 2026-03-05 12:05:02 +01:00
parent 3c8cdbb788
commit f2c3e80f3f

View file

@ -343,7 +343,7 @@ class CollectionService {
if (normalizedRole == 'viewer' &&
message.contains('collection_members_role_check')) {
throw Exception(
'Viewer role is not enabled in your database yet. Please apply the viewer-role migration first.',
'Viewer role is currently unavailable. Please contact the app administrator.',
);
}
rethrow;
@ -421,7 +421,7 @@ class CollectionService {
membersAfter.any((member) => member.userId == memberUserId);
if (stillExists) {
throw Exception(
'Member removal did not persist. Run VIEWER_ROLE_MIGRATION.sql to update policies/functions.',
'Member could not be removed. Please try again in a moment.',
);
}
}