mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: 避免aliyun access key不可用时返回NotFoundError错误
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user