Fix error message (#4559)
This commit is contained in:
@@ -1167,10 +1167,9 @@ export const revokeStreamPermissionsFactory =
|
||||
.count<{ count: string }[]>()
|
||||
|
||||
if (parseInt(streamAclEntriesCount.count) === 1)
|
||||
throw new StreamAccessUpdateError(
|
||||
'Stream has only one ownership link left - cannot revoke permissions.',
|
||||
{ info: { streamId, userId } }
|
||||
)
|
||||
throw new StreamAccessUpdateError('A project needs at least one project owner', {
|
||||
info: { streamId, userId }
|
||||
})
|
||||
|
||||
const aclEntry = existingPermission
|
||||
if (aclEntry?.role === Roles.Stream.Owner) {
|
||||
|
||||
@@ -348,7 +348,7 @@ describe('Streams @core-streams', () => {
|
||||
throw new Error('This should have thrown')
|
||||
})
|
||||
.catch((err) => {
|
||||
expect(err.message).to.include('cannot revoke permissions.')
|
||||
expect(err.message).to.include('A project needs at least one project owner')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user