错误码
更新时间:2024-06-03
请求发生错误时通过respone body返回详细错误信息,遵循如下格式:
参数名 | 类型 | 说明 |
code | String | 错误码 |
message | String | 错误描述 |
requestId | String | 本次请求的requestId |
参数名 | 类型 | 说明 |
---|---|---|
code | String | 错误码 |
message | String | 错误描述 |
requestId | String | 本次请求的requestId |
示例:
{
"requestId" : "ae2225f7-1c2e-427a-a1ad-5413b762957d",
"code" : "NoSuchKey",
"message" : "The resource you requested does not exist"
}
BCE公共错误码
错误返回码 | 错误消息 | 状态码 | 说明 |
---|---|---|---|
AccessDenied | Access denied. | 403 Forbidden | 无权限访问对应的资源。 |
InappropriateJSON | The JSON you provided was well-formed and valid, but not appropriate for this operation. |
400 Bad Request |
请求中的JSON格式正确,但语义上不符合 要求。如缺少某个必需项,或值类型不匹配 等。出于兼容性考虑,对于所有无法识别 的项应直接忽略,不应该返回这个错误。 |
InternalError | We encountered an internal error. Please try again. |
500 Internal Server Error |
所有未定义的其他错误。在有明确对应的 其他类型的错误时(包括通用的和服务自 定义的)不应该使用。 |
InvalidAccessKeyId | The Access Key ID you provided does not exist in our records. | 403 Forbidden | Access Key ID不存在。 |
InvalidHTTPAuthHeader | The Access Key ID you provided does not exist in our records. | 400 Bad Request | Authorization头域格式错误。 |
InvalidHTTPRequest | There was an error in the body of your HTTP request. |
400 Bad Request |
HTTP body格式错误。例如不符合指定的 Encoding等。 |
InvalidURI | Could not parse the specified URI. | 400 Bad Request |
URI形式不正确。例如一些服务定义的关键 词不匹配等。对于ID不匹配的问题,应定义 更加具体的错误码,如NoSuchKey。 |
MalformedJSON | The JSON you provided was not well-formed. | 400 Bad Request | JSON格式不合法。 |
InvalidVersion | The API version specified was invalid. | 404 Not Found | URI的版本号不合法。 |
OptInRequired | A subscription for the service is required. | 403 Forbidden | 没有开通对应的服务。 |
PreconditionFailed | The specified If-Match header doesn’t match the ETag header. | 412 Precondition Failed | 详见Etag。 |
RequestExpired | Request has expired. Timestamp date is <Data> . | 400 Bad Request | 请求超时。要改成x-bce-date。若 请求中只有Date,需将Date转成datetime。 |
IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. | 403 Forbidden | clientToken对应的API参数不一样。 |
SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided. Check your Secret Access Key and signing method. Consult the service documentation for details. |
400 Bad Request |
Authorization头域中附带的签名和服务端 验证不一致。 |
EIP业务错误码
错误码 | 错误描述 | HTTP状态码 | 语义 |
---|---|---|---|
InstanceNotFound | The specified instance does not exist. | 404 | 指定的实例不存在 |
EipNotFound | The specified eip does not exist. | 404 | 指定的eip不存在 |
InstanceAlreadyBind | The specified instance is already binded. | 400 | 指定的实例已被绑定 |
UnsupportedEipOperation | The status of specified eip does not support this operation. | 400 | 指定的EIP状态不支持此类型的操作 |
RealNameQualify | The login user is not pass real name qualify | 403 | 当前用户未通过实名认证 |
ExceedLimit | The amount of eip exceed limit | 413 | EIP数量超过用户配额限制 |
PrepayEip | The specified eip is prepay | 400 | 预付费EIP禁止通过API进行释放 |
PayFailed | Pay failed when create EIP | 400 | 创建EIP时付费失败 |
共享带宽业务错误码
错误码 | 错误描述 | HTTP状态码 | 语义 |
---|---|---|---|
InstanceNotFound | The specified instance does not exist. | 404 | 指定的实例不存在 |
UnsupportedInstanceOperation | The status of specified instance does not support this operation. | 400 | 指定的实例状态不支持此类型的操作 |
RealNameQualify | The login user is not pass real name qualify. | 403 | 当前用户未通过实名认证 |
ExceedEIPGroupLimit | The amount of eip group exceed limit. | 413 | 共享带宽数量超过用户配额限制 |
EIPGroupPayFailed | Pay failed when create eip group. | 400 | 创建共享带宽时付费失败 |
ExceedEIPLimitInGroup | The amount of eip exceed the group bandwidth limit | 400 | 共享带宽中的Eip数量超出用户配额限制 |
带宽包业务错误码
错误返回码 | 错误消息 | HTTP状态码 | 说明 |
---|---|---|---|
TypeNotMatchError | The bandwidth-packet's binding type is not match the instance type. | 400 | 带宽包绑定资源类型与资源实际类型不符。 |
BandwidthOverrun | The sum of bandwidth-packet and bandwidth of the bound bandwidth exceed the limit. | 400 | 带宽包带宽和所绑定带宽的带宽总和超限。 |
InstanceProductPayTypeError | Bandwidth-packet bound resource payment method only supports prepaid. | 400 | 带宽包绑定的资源付费方式仅支持预付费。 |
ResourceNotExit | The resource or instance of the bandwidth-packet is not exist or has been deleted. | 400 | 带宽包不存在或已删除。 |
RepeatBindingError | The bandwidth-packet is being repeated bound. | 400 | 待绑定资源已绑定带宽包。 |
TimeFormatIllegal | Time format is illegal. | 400 | 时间格式不合法。 |
TimeUnreasonableError | Time is not allowed. | 400 | 时间不在允许范围内。 |