Skip to main content

Error Codes

Error responses for the Token Plan API

Error responses of the Token Plan API come in two layers.

Gateway layer (HTTP 4xx)

When a request fails signature or parameter-type validation, the gateway returns the following structure (JSON or XML, depending on request headers):
{
  "RequestId": "01A12EB0-E949-55E1-8798-2BFF7E26DDC3",
  "Code": "InvalidPageNum",
  "Message": "Specified parameter PageNum is not valid.",
  "HostId": "modelstudio.cn-beijing.aliyuncs.com",
  "Recommend": "https://api.aliyun.com/troubleshoot?q=InvalidPageNum&product=ModelStudio&requestId=01A12EB0-E949-55E1-8798-2BFF7E26DDC3"
}
Common error codes:
CodeHTTP statusDescription
InvalidAccessKeyId.NotFound404AccessKey not found
SignatureDoesNotMatch400Request signature mismatch
MissingDate400x-acs-date header is missing
InvalidPageNum400Invalid parameter type (codes are named after the parameter, e.g. InvalidPageNum)

Business layer (HTTP 200)

Once the request passes gateway validation, business results are returned with HTTP 200, and the Success field distinguishes success from failure. On failure, Code and Message are returned:
{
  "Success": false,
  "Code": "APIKEY-1005",
  "Message": "Account acc_00000000000000000000000000000000 does not belong to this workspace"
}
Business error codes are defined by the service (for example, APIKEY-1005); refer to actual responses.
When troubleshooting, combine RequestId (gateway layer) with Code/Message (business layer). Continue with the endpoint list in the Overview.