Skip to content

Commit

Permalink
Conflict is the same as remove (#4821)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss authored Jun 14, 2024
1 parent fa9dd3b commit d088909
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dispatch/plugins/dispatch_google/groups/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,12 @@ def add_member(client: Any, group_key: str, email: str, role: str):

def remove_member(client: Any, group_key: str, email: str):
"""Removes member from google group."""
return make_call(client.members(), "delete", groupKey=group_key, memberKey=email)
try:
return make_call(client.members(), "delete", groupKey=group_key, memberKey=email)
except HttpError as e:
if e.resp.status in [409]:
log.debug(f"Member does not exist in google group. GroupKey={group_key} MemberKey={email}")
return


def list_members(client: Any, group_key: str, **kwargs):
Expand Down

0 comments on commit d088909

Please sign in to comment.