mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Replace error string with const
This commit is contained in:
parent
1dbb4197c4
commit
9c591b0c94
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user