mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #1641 from ioito/hotfix/qx-qcloud-error
统一处理ResourceNotFound返回id not find
This commit is contained in:
@@ -328,6 +328,9 @@ func _baseJsonRequest(client *common.Client, req tchttp.Request, resp qcloudResp
|
||||
break
|
||||
}
|
||||
}
|
||||
if strings.Contains(err.Error(), "Code=ResourceNotFound") {
|
||||
return nil, cloudprovider.ErrNotFound
|
||||
}
|
||||
if needRetry {
|
||||
log.Errorf("request url %s\nparams: %s\nerror: %v\ntry after %d seconds", req.GetDomain(), jsonutils.Marshal(req.GetParams()).PrettyString(), err, i*10)
|
||||
time.Sleep(time.Second * time.Duration(i*10))
|
||||
|
||||
Reference in New Issue
Block a user