Skip to content

Commit

Permalink
Error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovo committed Dec 16, 2024
1 parent 9aa365d commit dd0f625
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions webui/src/pages/auth/groups/group/members.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,20 @@ const GroupMemberList = ({ groupId, after, onPaginate }) => {
after = ""
let hasMore = true
let usersList = []
do {
let results = await auth.listUsers("", after, MAX_LISTING_AMOUNT);
usersList = usersList.concat(results.results);
after = results.pagination.next_offset;
hasMore = results.pagination.has_more;
try {
do {
const results = await auth.listUsers("", after, MAX_LISTING_AMOUNT);
usersList = usersList.concat(results.results);
after = results.pagination.next_offset;
hasMore = results.pagination.has_more;
} while (hasMore);
usersList.sort((a, b) => ResolveEntityDisplayName(a).localeCompare(ResolveEntityDisplayName(b)));
setAllUsers(usersList);
return usersList;
} catch (error) {
console.error("Error fetching users:", error);
return [];
}
while (hasMore);
usersList.sort((a, b) => ResolveEntityDisplayName(a).localeCompare(ResolveEntityDisplayName(b)));
setAllUsers(usersList)
return usersList
}
const searchUsers = async (prefix, maxResults) => {
let allUsersList = await setAllUsersFromLakeFS()
Expand Down

0 comments on commit dd0f625

Please sign in to comment.