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.
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 thenot found
substring returned in theerr.Error()
string.Not ideal indeed, but I think this can be improved later.