Getting error when using search params on community members query

Hey,
When I am searching for a member using the below function. I am getting an error when the network request is in progress and then I am getting the data once the request is completed.

     const queryParams = {
          communityId: "6510ad7dc3aa9c29664",
        };

        if (search) queryParams.search = search;

        const connection = await CommunityRepository.getCommunityMembers(
          queryParams
        );

The Error I am getting: ASCError: ASCWebSDK: This collection is no longer valid

Because of this, I am not able to add a loading indicator Because as soon as I call the above function the dataError function throws an error.

    connection.on("dataError", (error) => {
          console.log(error);   // This function throws an error right after the API is called
        });

Can you please explain why I am getting this error? Similar method I am using for searching groups I am not facing any kind of issues there.

Hello, thank you for reaching out, we have passed this to the team to help check.

@Ashish I can’t reproduce on my side. Maybe something wrong with the communityId. You can see my code and compare to yours

  function getCommunityMembersList() {
    const members =  CommunityRepository.getCommunityMembers({
      communityId: 'a1728810d2b7cbffcc4977121594e20f',
      sortBy: CommunityUserSortingMethod.FirstCreated,
    });

    members.on('dataUpdated', models => {
      console.log('Members', models);
    });
    members.on("dataError", (error) => {
      console.log(error);   // This function throws an error right after the API is called
    });
  }