kelvintaywl / terraform-provider-circleci

(Unofficial) Terraform Provider for CircleCI
https://registry.terraform.io/providers/kelvintaywl/circleci/latest
Mozilla Public License 2.0
12 stars 3 forks source link

chore: ignore 404 but log at WARN level #34

Closed kelvintaywl closed 1 year ago

kelvintaywl commented 1 year ago

This PR closes #31 , by catching HTTP 404s from API client when destroying the resource.

The catch logic itself is really not ideal; I would have preferred to cast the err and check its status code as 404 specifically. However, with my limited knowledge on Golang, i went with looking for the not found substring returned in the err.Error() string.

Not ideal indeed, but I think this can be improved later.