Common Headers and Error Responses
Common header specifications
Common request headers
| Common headers | Description |
|---|---|
| Authorization | Include Access Key and request signature |
| Content-Type | application/json; charset=utf-8 |
| x-bce-date | A string representing the time, compliant with API specifications. |
Standard HTTP headers are not included here. Common header fields are applied to all APIs and are mandatory. API request parameters may reside in the path, query, or body. Refer to the detailed API documentation for specifics.
Common response headers
| Common headers | Description |
|---|---|
| Content-Type | application/json; charset=utf-8 |
| X-Bce-Request-Id | They are generated by the server and automatically set in the response header fields. |
Error response
When an error occurs during API access, the system will return the relevant error code and error message to help users identify and resolve the issue. If a request error happens, detailed error information is provided in the response body using the following format:
| Parameter name | Types | Description |
|---|---|---|
| code | String | Error code |
| message | String | Error description |
| requestId | String | requestID of this request |
Example:
1{
2 "code":"cce.warning.ClusterNotFound",
3 "message":"ClusterID [xxx] belongs to account [xxx] not exists",
4 "requestId": "c4abab14-ebc4-4eb0-85d2-03c4d51eed18"
5}
CCE cluster management error return codes
When the error code prefix is cce.error., users generally need to submit ticket for processing. When the error code prefix is cce.warning. or cce.info., users can process it by themselves based on the error message.
| Error code | Error description | HTTP status code | Chinese explanation |
|---|---|---|---|
| cce.error.InternalError | We encountered an internal error Please try again. | 500 Internal Server Error | An undefined internal server error has occurred. |
| cce.warning.AccessDenied | Access denied. | 403 Forbidden | You do not have permission to access this resource. |
| cce.warning.MalformedJSON | The JSON you provided was not well-formed. | 400 BadRequest | The JSON format is invalid. |
| cce.warning.InvalidParam | Some params are invalid. | 400 BadRequest | The input parameters provided are invalid. |
| cce.warning.NoSuchObject | Target object not found. | 404 NotFound | The target resource could not be located. |
| cce.warning.ClusterNotFound | Cluster not found | 404 NotFound | The cluster was not found. |
| cce.warning.ClusterNotExposedToPublic | Cluster not exposed to public | 404 NotFound | Public network access to the cluster has not been activated. |
| cce.warning.InstanceAlreadyExists | Instance already exists | 400 Bad Request | The node already exists in the system. |
| cce.warning.ExistedInstanceIDDuplicated | Existed instance ID duplicated | 400 Bad Request | This entry duplicates an existing InstanceID. |
| cce.warning.InstanceNotFound | Instance not Found | 404 NotFound | The specified node could not be found. |
| cce.warning.VPCIDNotExists | VPC ID not exists | 404 NotFound | The specified VPC ID does not exist. |
| cce.warning.ClusterHAInvalid | ClusterHA invalid | 400 Bad Request | The number of master nodes in the cluster is invalid. |
| cce.warning.InstanceGroupNotFound | Instance group not found | 404 NotFound | The specified node group could not be found. |
| cce.info.RegionNotAvailable | Region not available | 412 Status Precondition Failed | The selected region is currently unavailable. |
| cce.info.BLBNotAvailable | BLB not available. You must have at least one bcc, dcc or bbc to create BLB for cluster. | 412 Status Precondition Failed | BLB is not accessible. At least one BCC, DCC, or BBC instance must exist within the VPC to create a BLB. |
