Replace error string with const
This commit is contained in:
@@ -1375,8 +1375,7 @@ func (c *Cloud) ensureSSLNegotiationPolicy(loadBalancer *elb.LoadBalancerDescrip
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
if aerr, ok := err.(awserr.Error); ok {
|
if aerr, ok := err.(awserr.Error); ok {
|
||||||
switch aerr.Code() {
|
switch aerr.Code() {
|
||||||
case "PolicyNotFound":
|
case elb.ErrCodePolicyNotFoundException:
|
||||||
// TODO change from string to `elb.ErrCodePolicyNotFoundException` once the AWS SDK is updated
|
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("error describing security policies on load balancer: %q", err)
|
return fmt.Errorf("error describing security policies on load balancer: %q", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user