-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Describe the bug
Sometimes querying the API to list group members will throw an error:
{
"errors": [
{
"message": "keycloakUsers is not iterable",
To Reproduce
Steps to reproduce the behavior:
-
Create a group with no members
-
Run the query:
query groupByName { groupByName(name:"memberless-group"){ id name memberCount members { user { email } role } } } -
It should fail all the time
-
Comment out either the
memberCountORmembersfield, and the query no longer fails- Here's where it gets weird
The error also sometimes triggers right after adding a member to a group, then running the query in step 2, but it's difficult to reproduce.
There is some kind of race condition (?) where the call to keycloakAdminClient.groups.listMembers in services/api/src/models/groups.ts returns null instead of an empty array.
Expected behavior
Listing group members doesn't throw errors.
Metadata
Metadata
Assignees
Labels
No labels