From 08262efa836e1721580134ff08927bd32c873fc9 Mon Sep 17 00:00:00 2001 From: David Whittaker <84562015+whitdog47@users.noreply.github.com> Date: Mon, 4 Nov 2024 15:43:10 -0800 Subject: [PATCH] Fix when group no longer exists (#5430) --- src/dispatch/plugins/dispatch_google/groups/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dispatch/plugins/dispatch_google/groups/plugin.py b/src/dispatch/plugins/dispatch_google/groups/plugin.py index c52abd402cea..2d42c51d4ce3 100644 --- a/src/dispatch/plugins/dispatch_google/groups/plugin.py +++ b/src/dispatch/plugins/dispatch_google/groups/plugin.py @@ -95,6 +95,11 @@ def remove_member(client: Any, group_key: str, email: str): f"Member does not exist in google group. GroupKey={group_key} MemberKey={email}" ) return + elif e.resp.status in [404]: + log.debug( + f"Group does not exist. GroupKey={group_key} Trying to remove MemberKey={email}" + ) + return def list_members(client: Any, group_key: str, **kwargs):