providers/digitalocean: fix 404 check
This commit is contained in:
parent
d70b451b58
commit
9d75352fd3
|
@ -195,7 +195,7 @@ func resource_digitalocean_droplet_destroy(
|
||||||
err := client.DestroyDroplet(s.ID)
|
err := client.DestroyDroplet(s.ID)
|
||||||
|
|
||||||
// Handle remotely destroyed droplets
|
// Handle remotely destroyed droplets
|
||||||
if strings.Contains(err.Error(), "404 Not Found") {
|
if err != nil && strings.Contains(err.Error(), "404 Not Found") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue