Add group in the error message from the graphQL query
Signed-off-by: Jasper Boeijenga <jboeijenga@gmail.com>
This commit is contained in:
@@ -236,7 +236,11 @@ export class GitLabClient {
|
||||
},
|
||||
).then(r => r.json());
|
||||
if (response.errors) {
|
||||
throw new Error(`GraphQL errors: ${JSON.stringify(response.errors)}`);
|
||||
throw new Error(
|
||||
`GraphQL errors: ${JSON.stringify(
|
||||
response.errors,
|
||||
)}, for group: ${groupPath}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (!response.data.group?.groupMembers?.nodes) {
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
|
||||
try {
|
||||
groupUsers = await client.getGroupMembers(group.full_path, ['DIRECT']);
|
||||
} catch {
|
||||
logger.error(`Failed fetching user for group: ${group.full_path}`);
|
||||
logger.error(`Failed fetching users for group: ${group.full_path}`);
|
||||
}
|
||||
|
||||
for (const groupUser of groupUsers.items) {
|
||||
|
||||
Reference in New Issue
Block a user