Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Add warn logging for project/group members
Browse files Browse the repository at this point in the history
  • Loading branch information
eXtremeX committed Dec 13, 2022
1 parent 0e4449c commit dbf3d1d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/provider/GitlabClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ export class GitlabClient {
`/projects/${projectId}/members/all`,
);
} catch (err) {
projectMembers = [];
if (err.status === 403) {
projectMembers = [];
this.logger.warn({ projectId }, 'Could not fetch members for project');
}
}
return projectMembers;
}
Expand All @@ -149,8 +152,12 @@ export class GitlabClient {
HttpMethod.GET,
`/groups/${groupId}/members/all`,
);
throw Error();
} catch (err) {
if (err.status === 403) groupMembers = [];
if (err.status === 403) {
groupMembers = [];
this.logger.warn({ groupId }, 'Could not fetch members for group');
}
}
return groupMembers;
}
Expand Down

0 comments on commit dbf3d1d

Please sign in to comment.