Skip to content

Commit

Permalink
handle emu idp group 404 (#2385)
Browse files Browse the repository at this point in the history
Co-authored-by: Corey Lane <corey.lane@orion.com>
  • Loading branch information
coreylane and coreylane-orion authored Sep 13, 2024
1 parent af9cf3d commit 2c5b3af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions github/resource_github_emu_group_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ func resourceGithubEMUGroupMappingRead(d *schema.ResourceData, meta interface{})

group, resp, err := client.Teams.GetExternalGroup(ctx, orgName, id64)
if err != nil {
if resp != nil && resp.StatusCode == 404 {
// If the group is not found, remove it from state
d.SetId("")
return nil
}
return err
}

Expand Down

0 comments on commit 2c5b3af

Please # to comment.