Public Header and Error Return
Last Updated:2021-02-25
Public Header Specification
Public Request Header
Public header | Description |
---|---|
Authorization | Including Access Key and request signature. |
Content-Type | application/json; charset=utf-8. |
x-bce-date | String representing the date comply with API specifications. |
The standard header fields for the html protocol are no longer listed here. The common header field will appear in each API and is required. POST, PUT, DELETE and other request data are placed in the request body.
Public Response Header
Public header | Description |
---|---|
Content-Type | application/json; charset=utf-8. |
x-bce-request-id | VPC backend is generated and automatically set to the response header field. |
Error Return
When there is an error in the user's access to the API, the corresponding error code and error information will be returned to the user, which is convenient for the user to locate the problem and make appropriate treatment. The detailed error information is returned through response body in case of a request error, and the following format is followed:
Parameter name | Type | Description |
---|---|---|
code | String | Error code |
message | String | Err description |
requestId | String | RequestID of this request |
Example:
{
"code": "NoSuchObject",
"message": "account not exist",
"requestId": "c4abab14-ebc4-4eb0-85d2-03c4d51eed18"
}
BCE Common Error Code
Error return code | Error message | Status code | Description |
---|---|---|---|
AccessDenied | Access denied. | 403Forbidden | No permission to access the corresponding resource. |
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 doesn't meet the requirements semantically, For example, a required item is missing, or the value type does not match. For consideration of compatibility, all unrecognizable items should be ignored directly, and this error should not be returned. |
InternalError | We encountered an internal error Please try again. | 500 Internal Server Error | All other undefined errors should not be utilized when there are specific corresponding other types of errors (including generic and service customized errors). |
InvalidAccessKeyId | The Access Key ID you provided doesnot exist in our records. | 403Forbidden | Access key ID does not exist. |
InvalidHTTPAuthHeader | The Access Key ID you provided does notexist in our records. | 400 BadRequest | Authorization header field format error. |
InvalidHTTPRequest | There was an error in the body of your HTTP request. | 400 Bad Request | The HTTP body format is wrong. For example, it does not conform to the specified Encoding. |
InvalidURI | Could not parse the specified URI. | 400 Bad Request | The URI format is incorrect, such as mismatch of some service-defined keywords. For ID mismatch, more specific error codes should be defined, such as NoSuchKey. |
MalformedJSON | The JSON you provided was not well-formed. | 400 BadRequest | Illegal JSON format. |
InvalidVersion | The API version specified was invalid. | 404 NotFound | The version number of the URI is illegal. |
OptInRequired | A subscription for the service is required. | 403Forbidden | No corresponding service has been enabled. |
PreconditionFailed | The specified If-Match header doesn't match the ETag header. | 412PreconditionFailed | See Etag for details. |
RequestExpired | Request has expired. Timestamp date is ";">. | 400 BadRequest | The request has timed out. Change to x-bce-date. If only Date exists in the request, you need to convert Date to datetime. |
IdempotentParameterMismatch | The request uses the same client token asa previous, but non-identical request. | 403Forbidden | The API parameters corresponding to clientToken are non-identical. |
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 in the authorization header field is inconsistent with the server-side verification. |
Error Return Code
Error code | Err description | HTTP status code | Chinese explanation |
---|---|---|---|
RegistryAlreadyExist | Namespace Already exist. | 400 | Domain name already exists. |
RegistryNoAuth | Authorization failed. | 404 | auth authorization failed. |
RegistryInitFail | Init Registry failed. | 404 | registry initialization failed. |
RegistryUpdateFail | Update user failed. | 404 | registration update failed. |
RegistryUserNotFound | Cannot found user. | 404 | The user to which the registry belongs does not exist. |
RegistryLackParams | Bad request, lack param: user, namespace or public. | 404 | Missing parameters. |
RegistryOutOfLimit | Create failed, because number of namespaces out of limit. | 404 | Excessive number of namespaces. |
RegistryNamespaceNotFound | Cannot find Namespace. | 404 | Namespace not found. |
RegistryRepositoryNotFound | Cannot find Repository. | 404 | registry does not exist. |
RegistryTagNotFound | Cannot find tag. | 404 | tag does not exist. |
RegistryDelFail | Delete manifest from registry failed. | 404 | Failed to delete manifest. |
RegistryInvalidParams | Invalid params to create image. | 404 | registration update failed. |
RegistryNamespaceNotExist | Namespace is not exist. | 404 | namespace does not exist. |
RegistryImageNotExist | Image is not exists. | 404 | Image does not exist. |
InternalServerError | Unknown error, please try again later. | 500 | Server internal error. |
Cce.warning.UserNotExist | User not exist. | 404 | User name does not exist. |
Cce.ClusterDeleted | Cluster is deleted already. | 500 | Cluster deleted |
Cce.ClusterCreating | Cluster is creating. | 500 | Cluster is being created. |
Cce.ClusterDeleting | Cluster is deleting. | 500 | Cluster is being removed. |
Cce.ClusterNotExit | Cluster is not exist. | 500 | Cluster does not exist. |
DuplicateCLusterUuid | Generate cluster ID failed, please try again. | 500 | Cluster creation failed, please try again. |
Cce.DeleteIDToken | BlbId or clientToken is null. | 500 | BldID or clientToken is empty. |
Cce.UpdateBlbId | BlbId is null. | 500 | BlbId is empty. |
Cce.CreateTokenNULL | ClientToken is null. | 500 | Clienttoken is empty. |
Cce.DeleteIdNULL | RouteRuled or clientToken is null. | 500 | RoutuRuled or clientToken is empty. |
Cce.RouteInfoIdNULL | RouteTableId or vpcId is null. | 500 | RouteTableId or vpcId is empty. |
Cce.ClusterNotExit | Cluster is not exist. | 500 | Cluster does not exist. |
Cce.EncryptFail | Encrypt passwd wrong. | 500 | Incorrect password encryption. |
Cce.DecryptFail | Decrypt passwd wrong. | 500 | Password decryption error. |
Cce.MoreThanOneUserPerAccount | One can create only one user per account. | 500 | Account number shall be unique. |
Cce.ImageMetaNull | ImageMeta is null. | 500 | Image metadata is empty. |
Cce.PasswdNotChange | New passwd should not as old. | 500 | New and old passwords need to be inconsistent. |
Cce.UserExist | Username already exist. | 500 | User name already exists. |
Cce.ConfirmFail | Passwd confirm fail. | 500 | Password confirmation failed. |
Cce.UserNoAuth | User authorization failed. | 500 | User auth authorization failed. |
Cce.NamespaceRepositoryOrTagNull | Namespace Repository or Tag is null. | 500 | The mirrored repository is not empty. |
Cce.ImageTagFormatError | image tag cannot be empty, should be 1-65 characters long, and can only contain numbers, letters and - \_ /. and can only start with letter or number |
500 | Error in image format. |
Cce.ImageRepositoryFormatError | image repository cannot be empty, should be 1-65 characters long, and can only contain numbers, letters and - \_ /. and can only start with letter |
500 | imageRepository format is wrong. |
Cce.NamespaceNull | Namespace is null. | 500 | namespace is empty. |
Cce.UserNameNull | Username cannot be empty. | 500 | Username is empty. |
Cce.NamespaceRequestFormatError | Username or namespace cannot be empty,namespace should be 1-65 characters long, and can only contain numbers and letters and - \_ /. and only can start with letters. |
500 | The format of the namespace request is wrong. |
Cce.PasswordFormatError | Password format error or password conformation not same as password. | 500 | Incorrect password format. |
Cce.UserNameFormatError | Username format error,your username must be between 4 and 30 characters long, and can only contain numbers and lowercase letters. | 500 | Incorrect format of user name. |
Cce.WrongMainZone | Main zone in order is illegal. | 500 | Illegal primary zone. |
Cce.namespaceOverQuota | Over the namespace quota. | 500 | Domain name quota exceeded. |
Cce.slaveOverQuota | Over the slave quota. | 500 | Slave quota exceeded. |
Cce.ClusterOverQuota | Over the cluster quota. | 500 | Cluster quota exceeded. |
Cce.ContainerNetConflict | Container net conflict with vpc or other container nets in the same vpc. | 500 | Container network conflicts. |
Cce.IllegalArguments | Illegal arguments, check your input. | 500 | Illegal parameter. |
Cce.UnsupportedPayType | Unsupported payment method. | 500 | Payment method not supported. |
Cce.OrderError | Cluster order creation failed. | 500 | Incorrect order |