Merge pull request #516 in YUNIONIO/onecloud from ~QUXUAN/onecloud:hotfix/qx-cloudaccount-validate to release/2.3.0

* commit '4c4b93aa4b67470dabb2fccdc2400f64cc315de9':
  避免公有云账号认证失败后返回系统登录界面
This commit is contained in:
邱剑
2018-11-16 14:55:04 +08:00
+1 -1
View File
@@ -147,7 +147,7 @@ func (manager *SCloudaccountManager) ValidateCreateData(ctx context.Context, use
if err == cloudprovider.ErrNoSuchProvder {
return nil, httperrors.NewResourceNotFoundError("no such provider %s", provider)
}
return nil, httperrors.NewInvalidCredentialError("invalid cloud account info")
return nil, httperrors.NewInputParameterError("invalid cloud account info")
}
return manager.SEnabledStatusStandaloneResourceBaseManager.ValidateCreateData(ctx, userCred, ownerProjId, query, data)