Skip to content

Commit

Permalink
fix(github_actions_repository_oidc_subject_claim_customization_templa…
Browse files Browse the repository at this point in the history
…te): graceful handling of 404 on read

The resource github_actions_repository_oidc_subject_claim_customization_template would error when the associated repository was deleted.

This change will gracefully remove the resource on 404 not found.
  • Loading branch information
acouvreur committed Nov 28, 2024
1 parent 1c11053 commit 5b248b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func resourceGithubActionsRepositoryOIDCSubjectClaimCustomizationTemplateRead(d
template, _, err := client.Actions.GetRepoOIDCSubjectClaimCustomTemplate(ctx, owner, repository)

if err != nil {
return err
return deleteResourceOn404AndSwallow304OtherwiseReturnError(err, d, "actions repository oidc subject claim customization template (%s, %s)", owner, repository)
}

if err = d.Set("repository", repository); err != nil {
Expand Down

0 comments on commit 5b248b8

Please sign in to comment.