mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
d.SetId before return, may be up too late.
pass `go tool vet` (great resource by the way)
This commit is contained in:
parent
4f07b92447
commit
7036d9e1c4
@ -77,8 +77,8 @@ func resourceAwsLoadBalancerBackendServerPoliciesRead(d *schema.ResourceData, me
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
if ec2err, ok := err.(awserr.Error); ok {
|
if ec2err, ok := err.(awserr.Error); ok {
|
||||||
if ec2err.Code() == "LoadBalancerNotFound" {
|
if ec2err.Code() == "LoadBalancerNotFound" {
|
||||||
return fmt.Errorf("LoadBalancerNotFound: %s", err)
|
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
|
return fmt.Errorf("LoadBalancerNotFound: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("Error retrieving ELB description: %s", err)
|
return fmt.Errorf("Error retrieving ELB description: %s", err)
|
||||||
|
@ -77,8 +77,8 @@ func resourceAwsLoadBalancerListenerPoliciesRead(d *schema.ResourceData, meta in
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
if ec2err, ok := err.(awserr.Error); ok {
|
if ec2err, ok := err.(awserr.Error); ok {
|
||||||
if ec2err.Code() == "LoadBalancerNotFound" {
|
if ec2err.Code() == "LoadBalancerNotFound" {
|
||||||
return fmt.Errorf("LoadBalancerNotFound: %s", err)
|
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
|
return fmt.Errorf("LoadBalancerNotFound: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("Error retrieving ELB description: %s", err)
|
return fmt.Errorf("Error retrieving ELB description: %s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user