Common Headers and Error Responses

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
All documents
menu
No results found, please re-enter

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
  • Document center
  • arrow
  • DNS
  • arrow
  • API Reference
  • arrow
  • Common Headers and Error Responses
Table of contents on this page
  • Common header specifications
  • Error response
  • BCE global error codes
  • PrivateZone error return codes

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

Previous
Appendix
Next
General Description