| @@ -23,7 +23,7 @@ const ( | |||||
| urlGetToken = "/v3/auth/tokens" | urlGetToken = "/v3/auth/tokens" | ||||
| urlNotebook = "/demanager/instances" | urlNotebook = "/demanager/instances" | ||||
| urlQueryNotebook = "/demanager/instances" | |||||
| errorCodeExceedLimit = "ModelArts.0118" | |||||
| ) | ) | ||||
| func getRestyClient() *resty.Client { | func getRestyClient() *resty.Client { | ||||
| if restyClient == nil { | if restyClient == nil { | ||||
| @@ -121,7 +121,7 @@ sendjob: | |||||
| if len(response.ErrorCode) != 0 { | if len(response.ErrorCode) != 0 { | ||||
| log.Error("CreateJob failed(%s): %s", response.ErrorCode, response.ErrorMsg) | log.Error("CreateJob failed(%s): %s", response.ErrorCode, response.ErrorMsg) | ||||
| if response.ErrorCode == "ModelArts.0118" { | |||||
| if response.ErrorCode == errorCodeExceedLimit { | |||||
| response.ErrorMsg = "所选规格使用数量已超过最大配额限制。" | response.ErrorMsg = "所选规格使用数量已超过最大配额限制。" | ||||
| } | } | ||||
| return &result, fmt.Errorf("CreateJob failed(%s): %s", response.ErrorCode, response.ErrorMsg) | return &result, fmt.Errorf("CreateJob failed(%s): %s", response.ErrorCode, response.ErrorMsg) | ||||