Common Headers and Error Responses
Updated at:2025-11-11
Common header specifications
Common request headers
| Common header | Description |
|---|---|
| Authorization | Include both the Access Key and the request signature. |
| Content-Type | application/json; charset=utf-8。 |
| x-bce-date | A string representing the date that complies with API specifications. |
The standard HTTP headers are not listed here. Common header fields will appear in each DNS API and are required. For POST, PUT, DELETE, and other requests, the request data should be placed in the request body.
Common response header
| Common header | Description |
|---|---|
| Content-Type | application/json; charset=utf-8。 |
| x-bce-request-id | These headers are generated by the VPC backend and automatically included in the response header. |
Error response
When an error occurs during VPC access, the corresponding error code and error information will be returned from VPC to help users identify and handle the error appropriately. If a request error occurs, detailed error information will be provided in the Response Body in the format below:
| Parameter name | Type | Description |
|---|---|---|
| code | String | Error code |
| message | String | Error description |
| requestId | String | Request ID of this request |
Example:
Plain Text
1{
2 "code": "NoSuchObject",
3 "message": "account not exist",
4 "requestId": "c4abab14-ebc4-4eb0-85d2-03c4d51eed18"
5}
BCE global error codes
| Error return code | Error message | Status code | Description |
|---|---|---|---|
| AccessDenied | Access denied. | 403Forbidden | You do not have permission to access this resource. |
| QualifyNotPass | The User has not pass qualify. | 403Forbidden | The account has not passed certification |
| 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 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. |
PrivateZone error return codes
| Error return codes | Error Message | Status Code | Description |
|---|---|---|---|
| ZoneIdInvalidException | The param zoneId is invalid. | 400 | Invalid ZoneId |
| RecordIdInvalidException | The param recordId is invalid. | 400 | Invalid RecordId |
| VpcRegionException | The param vpcId or Region is invalid. | 400 | Invalid VPC region |
| VpcIdException | The param vpcId is invalid. | 400 | Invalid VpcId |
| RegionException | The param Region is invalid | 400 | Invalid region |
| ZoneNameInvalid | The param ZoneName is invalid | 400 | Invalid ZoneName |
| ZoneHasBindTheVpc | The zone has bind the vpcs. | 400 | The newly added binding relationship already exists |
| RecordExistInvalid | The record has already exits:rr | 400 | Duplicate resolution record |
| RecordConflictInvalid | The record conflict:rr | 400 | Resolution record conflicts |
| UnSupportRecordTypeException | The record type: type is not support | 400 | This resolution record type is not supported |
