Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions extensions/mssql/src/azure/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export async function fetchUserGroups(userId: string): Promise<UserGroup[]> {
nextUrl = response.data["@odata.nextLink"];
} catch (error) {
console.error("Error fetching user groups:", error);
break; // Exit the loop on error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with the response here; but presumably response.data["@odata.nextLink"] won't work in the next iteration?

Or in other words, if response.data["@odata.nextLink"] may work to get groups, should we set nextUrl in the catch block and try again?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things that we need to handle here:

  1. if getting the response throws
  2. if parsing the response throws

Probably need multiple try-catch blocks in here

}
}

Expand Down
Loading