全部产品
云市场

错误处理

更新时间:2018-11-15 22:48:00

错误格式

当 IMM 在处理请求时,若发生异常,返回值形如

  1. {
  2. "Recommend": "https://error-center.aliyun.com/status/search?Keyword=InvalidMaxKeys&source=PopGw",
  3. "Message": "Specified parameter MaxKeys is not valid.",
  4. "RequestId": "772328B2-E5F4-453C-9C23-AAAAAAAAAAAA",
  5. "HostId": "imm.cn-beijing.aliyuncs.com",
  6. "Code": "InvalidMaxKeys"
  7. }

且 HTTP 状态码也会相应变化。其中:

  • Code 为错误码,提示错误类型。
  • Message 为错误消息,提示错误的原因和解决办法。
  • HostId 为您请求所在的 Region 对应的 Endpoint。如果您需要提工单咨询,请给到该值。
  • RequestId 为请求的唯一 ID。如果您需要提工单咨询,请给到该值。
  • Recommend 为快捷搜索链接,该字段非必选。

通用错误码表

以下列出了通用错误码表,涵盖大部分可能出现的错误。其中:

  • {ParameterName}{ResourceType} 在实际返回的响应中,分别对应 字段名称资源类型
  • HTTP Status Code 列为响应的 HTTP 状态码。
  • Message 列中的信息可能与实际返回的响应略有不同,这通常是为了提示更具体的错误信息。
HTTP Status Code Code Message
400 Invalid{ParameterName} Specified parameter {ParameterName} is not valid.
400 Missing{ParameterName} {ParameterName} is mandatory for this action.
400 InvalidParameter.{ParameterName} The input parameter {ParameterName} is not valid. Please refer to document.
400 InvalidParameter.{ParameterName}.Empty The input parameter {ParameterName} is empty. Please refer to document.
400 InvalidParameter.{ParameterName}.WrongFormat The input parameter {ParameterName} has invalid format. Please refer to document.
400 InvalidParameter.{ParameterName}.NotSupported The input parameter {ParameterName} is not supported. Please refer to document.
400 InvalidParameter.{ParameterName}.Missing The input parameter {ParameterName} is missing. Please refer to document.
400 InvalidParameter.{ParameterName}.NotMatch The input parameter {ParameterName} doesn’t match. Please refer to document.
400 InvalidParameter.{ParameterName}.OutOfRange The input parameter {ParameterName} doesn’t match the limitation. Please refer to document.
400 InvalidParameter.{ParameterName}.Expired The input parameter {ParameterName} is expired. Please refer to document.
400 QuotaExhausted.{ResourceType} The resource {ResourceType} has exceeded the limit. Please refer to document.
400 Invalid{ResourceType} The resource {ResourceType} is not valid. Please check.
400 Invalid{ResourceType}.NotEmpty The resource {ResourceType} is not empty. Please check.
404 Invalid{ResourceType}.NotFound The resource {ResourceType} cannot be found. Please check.
400 Invalid{ResourceType}.AlreadyExist The resource {ResourceType} already exists. Please check.
400 Invalid{ResourceType}.Unsupported The resource {ResourceType} is not supported. Please check.
400 Invalid{ResourceType}.DownloadFailed The resource {ResourceType} can not be downloaded. Please check.
403 Forbidden.AccountNotFound The specified account does not exist. Please check your account.
403 Forbidden.AccountInDebt The specified account is in debt. Please check your permission.
403 Forbidden.ServiceRole Cannot access specified service role. Please check your permission.
403 Forbidden.RiskControl This operation is forbidden by Alibaba Cloud RiskControl system. Please check.
403 Forbidden.ProjectType This project is not allowed to operate on the specified API. Please check.
403 Forbidden User not authorized to operate on the specified APIs. Please check your permission.
400 StateConflict User operation is not valid. Please try again later.
408 Timeout Request timed out. Please try again later.
500 InternalError The request has been failed due to some unknown error. Please try again later.
405 HTTPMethodNotAllowed The request http method is not supported for this resource. Please refer to document.
503 ServiceUnavailable The request has failed due to a temporary failure of the server. Please try again later.
503 ServiceUnavailable.RegionMaintaining System maintenance is in progress on the selected region. Please wait a few minutes before trying again.
400 STSAccessError STS access error. Please check your permission.
400 OSSAccessError OSS access error. Please check your permission.
403 Throttling The request project is blocked due to throttling control. Please wait a few minutes before trying again.
200 NoError Request success. Powered by IMM.
200 EmptyResult Request success, however, the result is empty. Powered by IMM.
500 DocumentConvertFailed The conversion has been failed. Please submit a ticket to us with RequestId.
400 FaceGroupNotEnoughFacesError The group doesn’t have enough face. Powered by IMM.
400 Idempotent.Processing The request is on processing, however the result is not available at this moment, you may try it again in a short while. Powered by IMM.
400 Idempotent.NotMatch The IdempotentToken has been used, however, the request parameters are not as same as last request. You may generate a new IdempotentToken and try again.

常见错误及处理

QuotaExhausted.CU

该提示说明当前请求的 API 频次,超过了创建 Project 时设置的的 CU 限制。

如果当前 Project 的计费方式是 按调用次数计费,即 BillingType = ByUsage,那么该 Project 的默认 CU 限制为 1 。您可以控制客户端请求的频率来解决该问题。

如果当前 Project 的计费方式是 按 QPS 计费,即 BillingType = ByCU,则可以通过 控制台 调整 CU 值,来获取更高的并发能力。调整 CU 通常需要数分钟生效。

两种计费方式无法转换,如有需要可以重新创建一个 Project 来切换到另外的计费方式。

InvalidParameter.TgtUrl

该提示说明 TgtUrl 参数错误。请确保您使用正确的 oss 路径(而不是 http / https )。并且您拥有该 oss 路径的写权限。

SDK.InvalidRegionId

该提示说明您所选取的 Region 错误,关于 IMM 已开通的 Region ,请参考 这里 。同时请确保您所使用的 SDK 为最新版本。

Throttling.User

该提示说明您的 API 调用过于频繁,超过流量控制。与 CU 限制不同的是,该限制通常很大。请检查您的调用过程中是否存在循环。如果确实循环,请在其中加入 sleep 来控制频率。该限制触发后会在一定时间内解除。

InvalidProject.IsDeleting

这通常出现在您试图创建一个刚刚删除的同名 Project 时。由于 Project 涉及计费,因此删除后 24 小时内无法重新创建同名 Project 。建议您更换名称,或等待 24 小时后再试。


如有任何问题,欢迎 联系我们