Error code
Updated at:2025-11-11
Error code format
When an error is encountered during API access, the corresponding error code and information will be returned to identify and address the issue. If a request error occurs, detailed error information is provided within the Response Body, formatted as follows:
| Parameter name | Types | Description |
|---|---|---|
| code | String | Error code |
| message | String | Error description |
| requestId | String | Request ID of this request |
For example:
Plain Text
1 {
2 "requestId" : "ae2225f7-1c2e-427a-a1ad-5413b762957d",
3 "code" : "NoSuchKey",
4 "message" : "The resource you requested does not exist"
5 }
Global error codes
The table below provides a list of public error codes for Baidu AI Cloud APIs.
| Code | Message | HTTP Status Code | Description |
|---|---|---|---|
| AccessDenied | Access denied. | 403 Forbidden | You do not have permission to access this resource. |
| InappropriateJSON | The JSON you provided was well-formed and valid, but not appropriate for this operation. | 400 Bad Request | The JSON format in the request is syntactically correct but semantically invalid. For example, a required item might be missing, or the value type might be mismatched. For compatibility, all unrecognized items should be ignored, and this error should not be returned. |
| InternalError | We encountered an internal error. Please try again. | 500Internal Server Error | All other undefined errors. This should not be used if there are clearly corresponding errors of other types, including both general and service-specific errors. |
| InvalidAccessKeyId | The Access Key ID you provided does not exist in our records. | 403 Forbidden | The Access Key ID does not exist. |
| InvalidHTTPAuthHeader | The HTTP authorization header is invalid. Consult the service documentation for details. | 400 Bad Request | The authorization header format is invalid. |
| InvalidHTTPRequest | There was an error in the body of your HTTP request. | 400 Bad Request | HTTP body format error, such as non-compliance with the specified encoding. |
| InvalidURI | Could not parse the specified URI. | 400 Bad Request | The URI format is invalid. For instance, predefined service-specific keywords may not be correct. For issues like ID mismatching, more specific error codes like NoSuchKey should be applied. |
| MalformedJSON | The JSON you provided was not well-formed. | 400 Bad Request | The JSON format is invalid. |
| InvalidVersion | The API version specified was invalid. | 404 Not Found | The URI version number is invalid. |
| OptInRequired | A subscription for the service is required. | 403 Forbidden | The corresponding service has not been activated. |
| PreconditionFailed | The specified If-Match header doesn't match the ETag header. | 412 Precondition Failed | Refer to the ETag header. |
| RequestExpired | Request has expired. Timestamp date is XXX. | 400 Bad Request | Request timeout. Replace XXX with the value of x-bce-date. If only the Date is used in the request, it must be converted to datetime. |
| IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. | 403 Forbidden | The API parameters do not match for the same clientToken. |
| 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 | The signature in the Authorization header does not match the server's verification. |
CFS error code
The table below provides a list of CFS API-specific error codes.
| Error code | Error description | HTTP status code | Semantics |
|---|---|---|---|
| InstanceNotFound | The specified CFS instance does not exist. | 404 Not Found | The specified CFS instance does not exist |
| InvalidFSType | The FS TYPE is invalid. | 400 Bad Request | File system type error |
| InvalidFSName | The FS NAME is invalid. | 400 Bad Request | The file system name does not meet requirements |
| InvalidFSProtocol | The FS PROTOCOL is invalid. | 400 Bad Request | The file system does not support this protocol |
| AvailabilityZoneNotFound | The specified availability zone does not exist. | 400 Bad Request | The user-configured zone does not exist |
| InvalidVpcId | The vpc id is invalid. | 400 Bad Request | Incorrect VPC ID |
| CreateOrderFail | We encountered an internal error. Please try again. | 500 Internal Server Error | Order creation failed, please try again later |
| DuplicateRequest | The request is duplicate. | 400 Bad Request | Duplicate requests for creating file system instance |
| FsNumQuotaExceeded | The number of CFS exceeded current quota. | 413 Request Entity Too Large | CFS count exceeds user quota limit |
| DropCreatingFS | The fs is in creating, can not drop. | 400 Bad Request | The file system instance that is being created cannot deleted |
| DropMountedFS | The fs has mount target , please drop before clear mount target. | 400 Bad Request | The file system instance with mount targets cannot deleted |
| FSNotInService | The fs is not in service, not allow this operation. | 400 Bad Request | The file system service is unavailable |
| InvalidSubnetId | The subnet id is invalid. | 400 Bad Request | The subnet ID provided by the user is unavailable |
| InvalidVpcOrSubnet | Invalid VPC ID or Subnet ID. | 400 Bad Request | Incorrect VPC ID or subnet ID provided when creating the mount target |
| AlreadyMounted | The fs already has mount target in the same subnet. | 400 Bad Request | The file system has been mounted to the target subnet |
| DropCreatingMount | The mount target is in creating, can not drop. | 400 Bad Request | The mount target that is being created cannot deleted |
| MountTargetNotFound | The request mount target id is not found. | 404 Not Found | Target mount target is not found |
| MissingParameter | A required parameter 'parameterName' is not supplied. | 400 Bad Request | The required parameter “parameterName” is missing in the request |
| InvalidParameter | The parameter 'parameterName' is invalid. | 400 Bad Request | The parameter "parameterName" is invalid |
| ResourceNotExists | The resource does not exist. | 404 Not Found | The requested host is not configured in the gateway’s corresponding region |
| EOFException | Unexpected EOF read on the socket. | 400 Bad Request | Exception occurred while reading the inputstream in the request, typically EOF |
| RequestTimeTooSkewed | The difference between the request time and the server's time is too large. | 403 Forbidden | Invalid timestamp in authorization |
| ServiceError | the dependency service is unavailable, host is {host} | 424 Failed Dependency | Service is in interrupted status |
| UnsupportedProtocol | The protocol '{http}' is not supported. | 403 Forbidden | Protocol validation does not support HTTP or HTTPS requests |
| QualifyNotPass | The User has not pass qualify. | 403 Forbidden | Certification failed |
| RateLimit | There are too many connections. The host is {host} | 421 Misdirected Request | Request is limited in rate |
| IllegalRequestUri | The request URI contains some forbidden characters. | 400 Bad Request | URL validity check failed |
| RequestUriForbidden | The request URI is forbidden or not included. | 400 Bad Request | The requested URI is not in the allowed URIs for the service |
| RequestEntityTooLargeException | Request entity is too large, should not exceed 50M. | 413 Request Entity Too Large | For multipart/ type requests, the file size exceeds 50 MB |
| RequestEntityEmptyException | Request entity is empty. | 400 Bad Request | For multipart/ type requests, the file byte stream is 0 |
| ParseBodyException | Parsing request body exception | 500 Internal Server Error | If a mapping file exists, exceptions may occur during body mapping |
| ServiceUnavailable | Service or dependent service is unavailable. | 503 Service Unavailable | Network errors such as backend request connection exceptions or timeouts |
| InvalidClientToken | The client token is invalid, client token must be a ascii string of no longer than 64 bits. | 400 Bad Request | Incorrect clientToken value for idempotent request |
| MultiRequestConflict | The request is refused because of a previous is in progress. | 409 Conflict | During idempotent requests, if the previous request is being processed, additional requests are received |
