Updated on 2024-04-02 GMT+08:00

Error Codes

Function

A customized message is returned when errors occur in an extended API of HUAWEI CLOUD. This section describes error codes and their meanings.

Format of an Error Response Body

If an error occurs during API calling, the system returns an error code and message to you. The following shows the format of an error response body:

STATUS CODE 400
{
    "error_code": "AIS.0014",
    "error_msg": "The JSON format of the input data is incorrect."
}

Error Code Description

If an error occurs during API calling, no result is returned. You can locate the cause of an error using the error code of each API.

The returned message body contains a specific error code and error message. If you fail to locate the cause of the error, contact customer service and provide the error code so that we can help you solve the problem as soon as possible.

If an error code starting with APIGW is returned after you call an API, rectify the fault by referring to the instructions provided in API Gateway Error Codes.

Status Code

Error Code

Description

Description

Handling Measure

400

AIS.0002

The authentication token is abnormal.

The authentication token is abnormal.

Check whether the token is correct.

400

AIS.0003

Failed to complete the request because of an internal service error.

Failed to complete the request because of an internal service error.

Contact HUAWEI CLOUD technical support. Submit a service ticket.

400

AIS.0004

The request is unauthorized.

The request is unauthorized.

The service has not been subscribed to. Subscribe to the service first. For details about how to subscribe to a service, see Image Recognition Getting Started.

400

AIS.0007

The service has not been enabled yet.

The service has not been enabled yet.

Subscribe to the service.

400

AIS.0010

The header is missing or left empty.

The header is missing or left empty.

The HTTP request lacks mandatory header information. Check whether mandatory fields such as Content-type exist.

400

AIS.0011

The request parameter is missing or left empty.

The request parameter is missing or left empty.

Check whether mandatory fields are missing in the request body. For details, see the request description of the corresponding API.

400

AIS.0012

The request parameter is not supported.

The request parameter is not supported.

Check whether the fields in the request are valid. For details, see the request description of the corresponding API.

400

AIS.0013

The request method is not allowed.

The request method is not allowed.

Check the request method.

400

AIS.0014

The JSON format of the input data is incorrect.

The JSON format of the input data is incorrect.

Check the JSON format of the input data.

400

AIS.0015

Base64 decoding of the input data is incorrect.

Base64 decoding of the input data is incorrect.

The Base64 encoding of the image is incorrect. Check the Base64 content.

400

AIS.0020

The size of the request body exceeds the upper limit.

The size of the request body exceeds the upper limit.

Check the request body size.

400

AIS.0021

The requested file type is not supported.

The requested file type is not supported.

Check the type of the requested file.

400

AIS.0022

The URL is invalid.

The URL is invalid.

Check the URL format.

400

AIS.0023

The file stored on OBS is oversized.

The file stored on OBS is oversized.

Check whether the image format is supported. For details, see Constraints.

400

AIS.0024

Failed to obtain the file from OBS. The signature has expired or fails to pass the authentication.

Failed to obtain the file from OBS. The signature has expired or fails to pass the authentication.

The signature has expired or fails to pass the authentication.

400

AIS.0025

The file stored on OBS is empty.

The file stored on OBS is empty.

Upload the file to OBS first.

400

AIS.0026

The token type is incorrect. The token of the project type must be used.

The token type is incorrect. The token of the project type must be used.

Use a token of the project type.

400

AIS.0027

The account has been frozen.

The account has been frozen.

Check whether the account is in arrears.

400

AIS.0028

The job is not owned by the current user.

The job is not owned by the current user.

Check the current account.

400

AIS.0029

Failed to download the file from the Internet. Check whether the URL of the file is correct and supported.

Failed to download the file from the Internet. Check whether the URL of the file is correct and supported.

Check whether the URL of the file is correct and supported.

400

AIS.0030

Failed to find the job. The job has expired or the passed job_id is incorrect. Check whether job_id is correct.

Failed to find the job. The job has expired or the passed job_id is incorrect. Check whether job_id is correct.

The task has expired and is cleared, or the job ID is incorrect. Check whether the job ID is correct.

400

AIS.0031

The maximum number of uncompleted jobs has been reached. The submission of new jobs has been suspended.

The maximum number of uncompleted jobs has been reached. The submission of new jobs has been suspended.

The submission of new jobs has been suspended.

400

AIS.0032

The monthly free calls have been used up. To continue to use the service, top up your account.

The monthly free calls have been used up. To continue to use the service, top up your account.

To continue to use the service, top up your account.

400

AIS.0201

An exception occurred during the process of obtaining the input image.

An exception occurred during the process of obtaining the input image.

Check the input image and obtain the image again.

400

AIS.0202

The image format is not supported.

The image format is not supported.

Check whether the image format is supported.

400

AIS.0203

The input parameter does not meet the requirements.

The input parameter does not meet the requirements.

Check the parameter.

400

AIS.0204

The color depth is not supported.

The color depth is not supported.

Check the configuration.

400

AIS.0205

The resolution of the image exceeds the upper limit.

The resolution of the image exceeds the upper limit.

Check whether the image format is supported.

400

AIS.0206

Algorithm calculation failed.

Algorithm calculation failed.

Check the configuration. Contact HUAWEI CLOUD technical support. Submit a service ticket.

400

AIS.0501

The input parameter is invalid.

The input parameter is invalid.

Check the parameter.

400

AIS.0502

The image format is not supported.

The image format is not supported.

Check whether the image format is supported. For details, see Constraints.

400

AIS.0503

The image is damaged.

The image is damaged.

Check whether the image is damaged. If yes, re-upload an image file that meets the requirements.

400

AIS.0504

The image size does not meet requirements.

The image size does not meet requirements.

Check whether the image size meets requirements.

The size of the Base64-encoded image cannot exceed 10 MB. The image resolution of the narrow sides must be greater than 15 pixels, and that of the wide sides cannot exceed 4096 pixels. The supported image formats include JPEG, PNG, BMP, and WEBP.

400

AIS.0505

Failed to run the algorithm.

Failed to run the algorithm.

Check the configuration. Contact HUAWEI CLOUD technical support. Submit a service ticket.

400

AIS.0506

An internal error occurred.

An internal error occurred.

Contact HUAWEI CLOUD technical support. Submit a service ticket.

400

APIG.0101

The API does not exist or has not been published.

The API does not exist or has not been published.

Check whether the API information is correct and whether the service is available in the corresponding region. Check whether the URL of the API is spelled correctly and whether the HTTP request method (such as POST and GET) is correct. Check whether the domain name and URI configured for service call are correct. For details about the domain name, see Regions and Endpoints.

400

APIG.0301

1. Incorrect IAM authentication information: Failed to decrypt the token. Check whether the entered token is complete.

2. The validity period of a token is 24 hours. If the token expires, obtain a new token and pass it.

3. The AK/SK authentication fails. Check whether the AK/SK is correct and whether the account is restricted due to arrears.

1. Incorrect IAM authentication information: Failed to decrypt the token. Check whether the entered token is complete.

2. The validity period of a token is 24 hours. If the token expires, obtain a new token and pass it.

3. The AK/SK authentication fails. Check whether the AK/SK is correct and whether the account is restricted due to arrears.

decrypt token fail: The token request authentication information of x-auth-token in the HTTP request header is incorrect. Check the sent request and token.

token expires: The token expires. Obtain a new token and pass it.

verify aksk signature fail: Check whether the AK and SK are correct and whether the account is in arrears.

400

APIG.0201

The request body is oversized.

The request body is oversized.

Check whether the request body is oversized. For details, see Constraints.

400

APIG.0308

The request is sent too fast and exceeds the default rate limit of the service.

The request is sent too fast and exceeds the default rate limit of the service.

The request is sent too fast and reaches the rate limit of the API. Reduce the request speed. If you have higher requirements on the request speed, submit a service ticket.

400

ModelArts.0203

Invalid token.

Invalid token.

Check whether the token is correct.

400

ModelArts.4101

The token is empty.

The token is empty.

The HTTP request header does not contain the token request authentication information of x-auth-token. Check the request.

400

ModelArts.4102

Failed to parse the token.

Failed to parse the token.

The token request authentication information of x-auth-token in the HTTP request header is incorrect. Check the sent request and token.

400

ModelArts.4103

The token is invalid.

The token is invalid.

The token request authentication information of x-auth-token in the HTTP request header is incorrect. Check the sent request and token.

400

ModelArts.4104

The length of the request body is invalid.

The length of the request body is invalid.

Check the request body length.

400

ModelArts.4105

The JSON format of the request body is incorrect.

The JSON format of the request body is incorrect.

Check the JSON format of the request body.

400

ModelArts.4106

The account is restricted.

The account is restricted.

Check the user resource status. For details about the account restriction reason, see the description of the account center.

400

ModelArts.4107

An exception occurred when obtaining the temporary AK/SK.

An exception occurred when obtaining the temporary AK/SK.

Contact HUAWEI CLOUD technical support and submit a service ticket.

400

ModelArts.4201

The request URL does not contain the service ID.

The request URL does not contain the service ID.

Check the service ID in the request URL.

400

ModelArts.4202

The request URL format is invalid.

The request URL format is invalid.

Check the request URL format.

400

ModelArts.4203

No access permission.

No access permission.

Check the access permission.

400

ModelArts.4204

The API is not subscribed to.

The API is not subscribed to.

Subscribe to this API. For details, see Applying for a Service. If the service has been subscribed to, check whether the region where the service is subscribed to is the same as the region where the service is called. If the region is correct, check whether the URL of the API is spelled correctly and whether the HTTP request method (such as POST and GET) is correct.

400

ModelArts.4601

The external URL is invalid.

The external URL is invalid.

Check whether the entered URL is correct.

400

ModelArts.4603

The file failed to be downloaded from the external URL.

The file failed to be downloaded from the external URL.

Check whether the entered URL is correct.

400

ModelArts.4702

The OBS agency failed to be queried.

The OBS agency failed to be queried.

Check whether the OBS agency has been enabled for the service.

400

ModelArts.4703

The OBS URL is invalid.

The OBS URL is invalid.

Check the entered OBS URL.

400

ModelArts.4704

Failed to obtain the OBS file.

Failed to obtain the OBS file.

Failed to download the OBS file. Check whether the file exists.

400

ModelArts.4705

The OBS file is oversized.

The OBS file is oversized.

Use a file that meets the service size limit as the input. For details, see Constraints.

400

ModelArts.4706

The OBS file does not exist.

The OBS file does not exist.

Failed to download the OBS file. Check whether the file exists.

403

AIP.0001

The authentication token is abnormal.

The authentication token is abnormal.

Check the token.

500

AIP.0500

Failed to complete the request because of an internal service error.

Failed to complete the request because of an internal service error.

Contact HUAWEI CLOUD technical support and submit a service ticket.

401

AIP.0003

The request is unauthorized.

The request is unauthorized.

Check the project ID in the request URL.

400

AIP.0004

The service does not exist.

The service does not exist.

Check the service name or version.

400

AIP.0005

Lack Header or Header %s is empty.

The header is missing or empty.

Check the header.

400

AIP.0006

Lack the request parameter, or the request parameter %s is empty.

Request parameters are missing or empty.

Check whether mandatory parameters are missing.

400

AIP.0007

The request parameter %s is incorrect.

The request parameter is incorrect.

Check the request parameter allowed by the service.

405

AIP.0008

The request method %s is not allowed, allow is %s.

The request method is not allowed.

Check the request method allowed by the service.

400

AIP.0009

The JSON format of the input data is incorrect.

The JSON format of the input data is incorrect.

Check the JSON format of the input data.

400

AIP.0010

The param:%s, val:%s , exceeds the range:[%s,%s].

The parameter value is out of range.

Check the correct value range of the parameter.

400

AIP.0011

Service of %s has been subscribed.

The service has been subscribed to.

Do not subscribe to the service repeatedly.

400

AIP.0012

The input parameter is incorrect.

The input parameter is incorrect.

Check whether the input parameter is correct.

400

AIP.0013

Lack the parameter %s, or the parameter is incorrect.

The subscription parameter is missing or incorrect.

Check whether the input parameter is correct.

400

AIP.0014

%s already exists.

The data already exists.

Check the existing data.

400

AIP.0015

Service of %s hasn't been subscribed.

The service has not been subscribed to.

Subscribe to the service.

400

AIP.0016

The request parameter is wrong, %s

The request parameter is incorrect.

Check the request parameter allowed by the service.

400

AIP.0017

The task id %s not exist.

The task ID does not exist.

Check whether the task ID is correct or has expired.

400

AIP.0018

Unable to get agency.

Failed to obtain the agency.

Check whether agency is enabled for the service.

400

AIP.0019

Multi input is not supported in current service: [%s], version: [%s].

Multi-input is not supported by current service version.

Check whether the service supports multi-input.

400

Other

If other error codes are displayed, submit a service ticket.