From af24cbfaa30cc9679fd929262e3eca6d33694ca4 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Mon, 13 Apr 2020 18:47:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=81=BF=E5=85=8Daliyun=20access=20key?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=94=A8=E6=97=B6=E8=BF=94=E5=9B=9ENotFoundE?= =?UTF-8?q?rror=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/multicloud/aliyun/aliyun.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/multicloud/aliyun/aliyun.go b/pkg/multicloud/aliyun/aliyun.go index de760dde8a..b90199b93e 100644 --- a/pkg/multicloud/aliyun/aliyun.go +++ b/pkg/multicloud/aliyun/aliyun.go @@ -119,6 +119,13 @@ func jsonRequest(client *sdk.Client, domain, apiVersion, apiName string, params resp, err := _jsonRequest(client, domain, apiVersion, apiName, params) retry := false if err != nil { + for _, code := range []string{ + "InvalidAccessKeyId.NotFound", + } { + if strings.Contains(err.Error(), code) { + return nil, err + } + } for _, code := range []string{"404 Not Found"} { if strings.Contains(err.Error(), code) { return nil, cloudprovider.ErrNotFound