Error response
Updated at:2025-10-20
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 | Type | Description |
|---|---|---|
| code | String | Indicate the specific error type |
| message | String | Detailed description of the error |
| requestId | String | Request ID of this request |
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.
| Error codes | Error Message | HTTP Status Code | Description |
|---|---|---|---|
| AccessDenied | Access denied. | 403Forbidden | 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 correct but contains semantic errors. For example, a required field might be missing, or the value type is incorrect. To ensure compatibility, unrecognized items will be ignored, and this type of error will not be returned. |
| InternalError | We encountered an internal error Please try again. | 500 Internal 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 doesnot exist in our records. | 403Forbidden | The Access Key ID does not exist. |
| InvalidHTTPAuthHeader | The Access Key ID you provided does notexist in our records. | 400 BadRequest | The authorization header format is invalid. |
| InvalidHTTPRequest | There was an error in the body of your HTTP request. | 400 Bad Request | The HTTP body format is invalid, for example, it could be due to incompatible Encoding. |
| InvalidURI | Could not parse the specified URI. | 400 Bad Request | The URI format is invalid. For instance, specific service keywords do not match. For problems like ID mismatches, more specific error codes, such as NoSuchKey, should be provided. |
| MalformedJSON | The JSON you provided was not well-formed. | 400 BadRequest | The JSON format is invalid. |
| InvalidVersion | The API version specified was invalid. | 404 NotFound | The URI version number is invalid. |
| OptInRequired | A subscription for the service is required. | 403Forbidden | The corresponding service has not been activated. |
| PreconditionFailed | The specified If-Match header doesn’tmatch the ETag header. | 412PreconditionFailed | Please refer to the Etag for more information. |
| RequestExpired | Request has expired. Timestamp date is . | 400 BadRequest | Request timeout. Replace with x-bce-date. If the request contains only the Date header, convert it to datetime. |
| IdempotentParameterMismatch | The request uses the same client token asa previous, but non-identical request. | 403Forbidden | The API parameters do not match for the same clientToken. |
| SignatureDoesNotMatch | The request signature we calculated does not match the signature you provided. Check yourSecret Access Key and signing method. Consultthe service documentation for details. | 400 Bad Request | The signature in the Authorization header does not match the server's verification. |
BCC error return codes
The following table lists the error codes specific to the BCC API.
| Error code | Error message | HTTP status code | Description |
|---|---|---|---|
| QualifyNotPass | The User has not pass qualify. | 403 | The account has not passed certification |
| BadRequest | Bad request parameters or illegal request. | 400 | Request error |
| AuthError | No authentication or authentication error. | 401 | Permission error |
| AccessDenied | No permission to accessor or permission error. | 403 | Operation prohibited |
| NoSuchObject | The specified object is not found or resource do not exist. | 404 | Object not found |
| IllegalOperation | Illegal operation type. | 405 | Operation type error |
| OperationDenied | Operation not available. | 409 | Inoperable (duplicate name, reconstruction in progress, etc.) |
| LimitExceeded | Limit exceeded for current request. | 413 | Exceed limit |
| ServiceInternalError | Internal service occurs error. | 500 | Internal service error |
| ServiceUnavailable | Service is unavailable. | 503 | Service unavailable |
| Volume.DiskIdIsEmpty | Volume id must be provided. | 400 | Disk ID cannot be null |
| Volume.DiskNameInvalid | Volume name is invalid. | 400 | Incorrect name format |
| Volume.DiskDescriptionInvalid | Volume description is invalid. | 400 | Incorrect description format |
| Volume.DiskSizeInvalid | Volume size is invalid. | 400 | Invalid size |
| Volume.VolumeTypeInvalid | Volume type is invalid. | 400 | Incorrect disk type |
| Volume.DiskQuotaExceededLimit | Number of volumes exceeds limit. | 413 | CDS disk quota exceeded |
| Volume.DiskSizeQuotaExceededLimit | Volume size exceeds total capacity quota. | 413 | CDS disk size quota exceeded |
| Instance.ReleaseTimeInvalid | Fail to update the instance scheduled release time settings. | 400 | Incorrect scheduled released parameters |
| Instance.AttachedVolumeExceededSnapshotLimit | Scheduled snapshot quota of your new mount CDS disk is exceeded, please change the policy or manually deleted non-scheduled snapshot. | 413 | Exceeded attach limit for CDS disks |
| Instance.SnapshotPolicyRetainsDaysInvalid | Days format of retention of scheduled snapshot is invalid. | 400 | Invalid automatic snapshot retention days |
| Instance.SnapshotPolicyNameInvalid | The policy name of scheduled snapshot is invalid. | 400 | Invalid automatic snapshot policy name |
| Instance.AdminPassDecryptionException | Invalid encryption code found for the admin password. | 400 | Invalid encrypted password |
| PaymentFailed | payment failed, please check remaining balance. | 403 | Payment failed |
| Asp.NameInvalid | asp name is invalid. | 400 | Invalid name |
| Asp.RetentionDaysInvalid | RetentionDays should in [1,10000] | 400 | Invalid retention days |
| Asp.TimePointsInvalid | TimePoints should in [0,23] | 400 | Exceptional execution timestamp parameter |
| Asp.RepeatWeekdaysInvalid | RepeatWeekdays should in [1,7] | 400 | Exceptional execution date parameter |
| Asp.VolumeTypeInvalid | Volume type should be Cds or System | 400 | Invalid volume type |
| Asp.VolumeStatusInvalid | Volume must be in-use | 400 | Volume status must be "in-use" |
| BadRequest | missing parameter. | 400 | Missing parameter |
| ServiceInternalError | Internal service occurs error. | 500 | Internal error |
| BadRequest | Bad request parameters or illegal request. | 400 | Request parameter error |
| NoSuchObject | The specified object is not found or resource do not exist. | 404 | The specified ASP does not exist |
| BadRequest | Bad request parameters or illegal request. | 400 | Invalid request parameters |
