Skip to content

Commit

Permalink
SCALRCORE-18531 > Add SetId
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Vang committed Mar 23, 2021
1 parent 038f924 commit bbe5cc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scalr/resource_scalr_endpoint.go
Expand Up @@ -116,7 +116,8 @@ func resourceScalrEndpointRead(d *schema.ResourceData, meta interface{}) error {
endpoint, err := scalrClient.Endpoints.Read(ctx, endpointID)
if err != nil {
if err == scalr.ErrResourceNotFound {
return fmt.Errorf("Could not find endpoint %s: %v", endpointID, err)
d.SetId("")
return nil
}
return fmt.Errorf("Error retrieving endpoint: %v", err)
}
Expand Down

0 comments on commit bbe5cc1

Please sign in to comment.