Skip to content

Commit c5e2e12

Browse files
committed
Adding error handling for missing global ID
1 parent 08aa432 commit c5e2e12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

github/resource_github_enterprise_ip_allow_list_entry.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ func resourceGithubEnterpriseIpAllowListEntryDelete(ctx context.Context, d *sche
220220
}
221221

222222
err := client.Mutate(ctx, &mutation, input, nil)
223-
if err != nil {
223+
// GraphQL will return a 200 OK if it couldn't find the global ID
224+
if err != nil && !strings.Contains(err.Error(), "Could not resolve to a node with the global id") {
224225
return diag.FromErr(err)
225226
}
226227

0 commit comments

Comments
 (0)