Merge pull request #58327 from sharmaansh/patch-2

Automatic merge from submit-queue (batch tested with PRs 58920, 58327, 60577, 49388, 62306). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Replace error string with const
pull/8/head
Kubernetes Submit Queue 2018-05-30 16:09:24 -07:00 committed by GitHub
commit 53fd4cd46d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

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