Skip to content

Commit 9d75352

Browse files
committed
providers/digitalocean: fix 404 check
1 parent d70b451 commit 9d75352

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builtin/providers/digitalocean/resource_digitalocean_droplet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func resource_digitalocean_droplet_destroy(
195195
err := client.DestroyDroplet(s.ID)
196196

197197
// Handle remotely destroyed droplets
198-
if strings.Contains(err.Error(), "404 Not Found") {
198+
if err != nil && strings.Contains(err.Error(), "404 Not Found") {
199199
return nil
200200
}
201201

0 commit comments

Comments
 (0)