错误码
所有文档
menu

文件存储 CFS

错误码

产品详情自助选购

错误码格式

当用户访问API出现错误时,会返回给用户相应的错误码和错误信息,便于定位问题,并做出适当的处理。请求发生错误时通过Response Body返回详细错误信息,遵循如下格式:

参数名 类型 说明
code String 错误码
message String 错误描述
requestId String 本次请求的requestId

例如:

    {
        "requestId" : "ae2225f7-1c2e-427a-a1ad-5413b762957d",
        "code" : "NoSuchKey",
        "message" : "The resource you requested does not exist"
    }

公共错误码

下表列出了百度智能云API的公共错误码。

Code Message HTTP Status Code 说明
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. 500Internal Server Error 所有未定义的其他错误。在有明确对应的其他类型的错误时(包括通用的和服务自定义的)不应该使用。
InvalidAccessKeyId The Access Key ID you provided does not exist in our records. 403 Forbidden Access Key ID不存在。
InvalidHTTPAuthHeader The HTTP authorization header is invalid. Consult the service documentation for details. 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 XXX. 400 Bad Request 请求超时。XXX要改成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头域中附带的签名和服务端验证不一致。

CFS错误码

下表列出了CFS API特有错误码。

错误码 错误描述 HTTP状态码 语义
InstanceNotFound The specified CFS instance does not exist. 404 Not Found 指定的CFS实例不存在
InvalidFSType The FS TYPE is invalid. 400 Bad Request 文件系统的类型错误
InvalidFSName The FS NAME is invalid. 400 Bad Request 文件系统的名称不符合要求
InvalidFSProtocol The FS PROTOCOL is invalid. 400 Bad Request 文件系统不支持该协议
AvailabilityZoneNotFound The specified availability zone does not exist. 400 Bad Request 用户设置的分区(zone) 不存在
InvalidVpcId The vpc id is invalid. 400 Bad Request vpc id 错误
CreateOrderFail We encountered an internal error. Please try again. 500 Internal Server Error 创建订单失败,请稍候重试
DuplicateRequest The request is duplicate. 400 Bad Request 重复的创建文件系统实例请求
FsNumQuotaExceeded The number of CFS exceeded current quota. 413 Request Entity Too Large CFS数量超过用户配额限制
DropCreatingFS The fs is in creating, can not drop. 400 Bad Request 不能删除正在创建的文件系统实例
DropMountedFS The fs has mount target , please drop before clear mount target. 400 Bad Request 不能删除有挂载点的文件系统实例
FSNotInService The fs is not in service, not allow this operation. 400 Bad Request 文件系统服务不可用
InvalidSubnetId The subnet id is invalid. 400 Bad Request 用户提供的 subnet id 不可用
InvalidVpcOrSubnet Invalid VPC ID or Subnet ID. 400 Bad Request 创建挂载点时,提供的 vpc id 或者 subnet id 不正确
AlreadyMounted The fs already has mount target in the same subnet. 400 Bad Request 文件系统已经被挂载到目标子网络
DropCreatingMount The mount target is in creating, can not drop. 400 Bad Request 不能删除正在创建的挂载点
MountTargetNotFound The request mount target id is not found. 404 Not Found 没有找到目标挂载点
MissingParameter A required parameter 'parameterName' is not supplied. 400 Bad Request 该请求缺少必要的参数“parameterName”
InvalidParameter The parameter 'parameterName' is invalid. 400 Bad Request "parameterName"参数不合法
ResourceNotExists The resource does not exist. 404 Not Found 请求的host未在网关对应的region中配置
EOFException Unexpected EOF read on the socket. 400 Bad Request 读取request 中inputstream异常,通常为eof
RequestTimeTooSkewed The difference between the request time and the server's time is too large. 403 Forbidden Authorization中timestamp无效
ServiceError the dependency service is unavailable, host is {host} 424 Failed Dependency 服务处于熔断状态
UnsupportedProtocol The protocol '{http}' is not supported. 403 Forbidden 协议校验不支持http或者https请求
QualifyNotPass The User has not pass qualify. 403 Forbidden 未通过实名认证
RateLimit There are too many connections. The host is {host} 421 Misdirected Request 请求被限速
IllegalRequestUri The request URI contains some forbidden characters. 400 Bad Request url合法性校验失败
RequestUriForbidden The request URI is forbidden or not included. 400 Bad Request 请求的uri不在服务允许的uri
RequestEntityTooLargeException Request entity is too large, should not exceed 50M. 413 Request Entity Too Large multipart/ 类型的请求,文件大小大于50M
RequestEntityEmptyException Request entity is empty. 400 Bad Request multipart/ 类型的请求,文件字节流为0
ParseBodyException Parsing request body exception 500 Internal Server Error 如果有映射文件,在映射body时异常
ServiceUnavailable Service or dependent service is unavailable. 503 Service Unavailable 与后端请求连接异常或超时等网络错误
InvalidClientToken The client token is invalid, client token must be a ascii string of no longer than 64 bits. 400 Bad Request 幂等请求的clientToken的值错误
MultiRequestConflict The request is refused because of a previous is in progress. 409 Conflict 幂等请求时,前一个请求正在处理中,又收到其它请求
上一篇
服务域名
下一篇
文件系统相关接口