Error Return
Last Updated:2020-07-20
If the error occurs when you access API, it returns the corresponding error code and error information, to faciliate you to locate the problem and take appropriate measures. When an error occurs in the request, the detailed error message is returned via the Response Body in the format below:
Parameter Name | Type | Note |
---|---|---|
code | String | It indicates the specific error type |
message | String | Detailed description of this error |
requestId | String | RequestId of this request |
Example:
{
"requestId" : "ae2225f7-1c2e-427a-a1ad-5413b762957d",
"code" : "NoSuchKey",
"message" : "The resource you requested does not exist"
}
Common Error Code
The table below lists the common error codes of Baidu AI Cloud API.
Error Code | Error Message | HTTP states code | Description |
---|---|---|---|
AccessDenied | Access denied. | 403Forbidden | You’ve no permission to access corresponding resources. |
InappropriateJSON | The JSON you provided was well-formed and valid, but not appropriate forthis operation. | 400 Bad Request | The JSON format in the request is correct, but its meanings does not meet the requirements. For example, a required item is missed, or the value type is not matched. For compatibility purpose, all unrecognized items is directly ignored and this error is not returned |
InternalError | We encountered an internal error Please try again. | 500 Internal Server Error | All other undefined errors. It shall not be used when there are other types of errors (including common and service customized errors) corresponded definitely |
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 field format is error |
InvalidHTTPRequest | There was an error in the body of your HTTP request. | 400 Bad Request | The HTTP body format is error. For example, it does not conform to the specified Encoding etc |
InvalidURI | Could not parse the specified URI. | 400 Bad Request | URI form is incorrect. For example, the keywords defined by some services are not matched. For the problem of ID mismatching, more specific error codes shall be defined, such as NoSuchKey |
MalformedJSON | The JSON you provided was not well-formed. | 400 BadRequest | The JSON format is illegal |
InvalidVersion | The API version specified was invalid. | 404 NotFound | URI version number is illegal |
OptInRequired | A subscription for the service is required. | 403Forbidden | No corresponding service has been opened |
PreconditionFailed | The specified If-Match header doesn’tmatch the ETag header. | 412PreconditionFailed | See Etag |
RequestExpired | Request has expired. Timestamp date is . | 400 BadRequest | Request timeout. Must change to x-bce-date. If there is only Date in the request, you need to change Date to date time |
IdempotentParameterMismatch | The request uses the same client token asa previous, but non-identical request. | 403Forbidden | The API parameters corresponding to clientToken are different |
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 attached to the Authorization header field is inconsistent with the server verification |
BCC error return code
The table below lists the specific error codes of BCC API.
Error Code | Error Message | HTTP states code | Description |
---|---|---|---|
QualifyNotPass | The User has not pass qualify. | 403 | The account number does not pass the real name authentication |
BadRequest | Bad request parameters or illegal request. | 400 | Illegal request |
AuthError | No authentication or authentication error. | 401 | Privilege error |
AccessDenied | No permission to accessor or permission error. | 403 | Operation disabled |
NoSuchObject | The specified object is not found or resource do not exist. | 404 | The object is not found. |
IllegalOperation | Illegal operation type. | 405 | Operation type error |
OperationDenied | Operation not available. | 409 | Operation not available (duplicate name and reconstruction in progress) |
LimitExceeded | Limit exceeded for current request. | 413 | Limit exceeded |
ServiceInternalError | Internal service occurs error. | 500 | Internal service error |
ServiceUnavailable | Service is unavailable. | 503 | Service not available |
Volume.DiskIdIsEmpty | Volume id must be provided. | 400 | The disk ID should not be empty. |
Volume.DiskNameInvalid | Volume name is invalid. | 400 | The disk name is invalid. |
Volume.DiskDescriptionInvalid | Volume description is invalid. | 400 | The disk description is invalid. |
Volume.DiskSizeInvalid | Volume size is invalid. | 400 | The disk size is invalid. |
Volume.VolumeTypeInvalid | Volume type is invalid. | 400 | The disk type is invalid. |
Volume.DiskQuotaExceededLimit | Number of volumes exceeds limit. | 413 | The number of CDS disks exceeds the limit. |
Volume.DiskSizeQuotaExceededLimit | Volume size exceeds total capacity quota. | 413 | The CDS disk capacity exceeds the total capacity quota. |
Instance.ReleaseTimeInvalid | Fail to update the instance scheduled release time settings. | 400 | The scheduled release parameter is invalid. |
Instance.AttachedVolumeExceededSnapshotLimit | Scheduled snapshot quota of your new mount CDS disk is exceeded, please change the policy or manually deleted non-scheduled snapshot. | 413 | The number of CDS disks mounted exceeds the limit. |
Instance.SnapshotPolicyRetainsDaysInvalid | Days format of retention of scheduled snapshot is invalid. | 400 | The days format of retention of automatic snapshot is invalid. |
Instance.SnapshotPolicyNameInvalid | The policy name of scheduled snapshot is invalid. | 400 | The policy name of automatic snapshot is invalid. |
Instance.AdminPassDecryptionException | Invalid encryption code found for the admin password. | 400 | Invalid encryption code |
PaymentFailed | payment failed, please check remaining balance. | 403 | Payment failed |
Asp.NameInvalid | asp name is invalid. | 400 | The snapshot name is invalid. |
Asp.RetentionDaysInvalid | RetentionDays should in [1,10000] | 400 | The days format of retention is invalid. |
Asp.TimePointsInvalid | TimePoints should in [0,23] | 400 | The time point parameter is abnormal. |
Asp.RepeatWeekdaysInvalid | RepeatWeekdays should in [1,7] | 400 | The date parameter is abnormal. |
Asp.VolumeTypeInvalid | Volume type should be Cds or System | 400 | The volume type is invalid. |
Asp.VolumeStatusInvalid | Volume must be in-use | 400 | The volume status must be in-use. |
BadRequest | missing parameter. | 400 | Missing parameter |
ServiceInternalError | Internal service occurs error. | 500 | Internal service 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 parameter |