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 (#2483)

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.

Co-authored-by: Keegan Campbell <[email protected]>
  • Loading branch information
acouvreur and kfcampbell authored Feb 27, 2025
1 parent c99f24e commit d63ad78
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 d63ad78

Please sign in to comment.