Skip to content

Commit 032a427

Browse files
committed
Fixing the DigitalOcean Droplet 404 potential on refresh of state
1 parent bf11be8 commit 032a427

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
@@ -189,7 +189,7 @@ func resourceDigitalOceanDropletRead(d *schema.ResourceData, meta interface{}) e
189189
droplet, _, err := client.Droplets.Get(id)
190190
if err != nil {
191191
// check if the droplet no longer exists.
192-
if err.Error() == "Error retrieving droplet: API Error: 404 Not Found" {
192+
if strings.Contains(err.Error(), "404 The resource you were accessing could not be found") {
193193
d.SetId("")
194194
return nil
195195
}

0 commit comments

Comments
 (0)