通过本文您可以了解智能媒体管理请求发生错误时的错误格式、通用错误码和常见错误及处理。
错误格式
如果在处理请求时发生异常,则智能媒体管理会返回如下格式的错误信息。
{
"Recommend": "https://error-center.aliyun.com/status/search?Keyword=InvalidMaxKeys&source=PopGw",
"Message": "Specified parameter MaxKeys is not valid.",
"RequestId": "772328B2-E5F4-453C-9C23-AAAAAAAAAAAA",
"HostId": "imm.cn-hangzhou.aliyuncs.com",
"Code": "InvalidMaxKeys"
}
HTTP状态码也会相应变化,错误信息的参数说明请参见下表。
参数 | 描述 |
Recommend | 快捷搜索链接,该参数非必选。 |
Message | 错误消息,提示错误的原因和解决办法。 |
RequestId | 当次请求的Request ID。 如果请求失败,请提交工单并在工单中提供RequestId,用于问题跟踪和定位。 |
HostId | 请求所在的地域对应的Endpoint。 如果请求失败,请提交工单并在工单中提供HostId,用于问题跟踪和定位。 |
Code | 错误码,提示错误类型。 |
通用错误码
下表列出了通用错误码,涵盖大部分可能出现的错误。
HTTP Status Code列为响应的HTTP状态码。
Code列为错误码,其中{ParameterName}和{ResourceType}在实际返回的响应中分别对应参数名称和资源类型。
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. | 项目类型不支持执行指定的API,请检查。 |
403 | Forbidden | User not authorized to operate on the specified APIs. Please check your permission. | 用户未被授权使用指定API进行操作,请检查账号的权限。 |
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. | 资源不支持HTTP方式的请求,请参考文档设置。 |
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. | 访问STS错误,请检查账号的权限。 |
400 | OSSAccessError | OSS access error. Please check your permission. | 访问OSS错误,请检查账号的权限。 |
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. | 文档转换失败,请提交工单并提供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限制。 | 该额度不支持调整,如需更高的并发能力,请使用新版(2020-09-30版本)API。
|
InvalidParameter.TgtUrl | TgtUrl参数错误。 | 请确保已使用正确的OSS路径并且拥有该OSS路径的写权限。 |
SDK.InvalidRegionId | 选择的Region错误。 | 请确保已设置正确的地域同时使用的SDK为最新版本。 关于智能媒体管理已开通的Region,请参见服务地域。 |
Throttling.User | API调用过于频繁,超过流量控制。 | 请检查调用过程中是否存在循环。如果存在循环,请加入sleep来控制频率。 该限制触发后会在一定时间内解除。 |
InvalidProject.IsDeleting | 创建一个刚刚删除的同名Project。 | 由于Project涉及计费,因此删除后24小时内无法重新创建同名的Project。建议更换名称或者等待24小时后再重试。 |