Skip to content

Commit

Permalink
Merge pull request #890 from cjgajard/tfprovdev-113
Browse files Browse the repository at this point in the history
Handle 403 at EO path service refresh as orphan
  • Loading branch information
cjgajard authored Jun 20, 2024
2 parents 1dd15df + 7afbfa1 commit e3402c2
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ func resourcePagerDutyEventOrchestrationPathServiceRead(ctx context.Context, d *
return retry.NonRetryableError(err)
}

// When the service referenced by `id` gets deleted manually, the response
// of the API is a 403 instead of the expected 404. We will then handle the
// it as the service is gone, deleting this orphan EO path service.
if isErrCode(err, http.StatusForbidden) {
d.SetId("")
return nil
}

time.Sleep(2 * time.Second)
return retry.RetryableError(err)
}
Expand Down

0 comments on commit e3402c2

Please sign in to comment.