Error Codes
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. When an API call fails, HTTPS status code 4xx or 5xx is returned. The returned message body contains a specific error code and error message. If you are unable to identify the cause of an error, contact the HUAWEI CLOUDcustomer service and provide the error code so that we can help you resolve the problem at the earliest.
Format of an Error Response Body
If an error occurs during API calling, an error code and a message will be displayed. The following shows an error response body.
{
"error_msg": "The input parameter is invalid.",
"error_code": "AIS.0101"
} In the response body, error_code indicates the error code, and error_msg provides information about the error.
Error Codes
OCR is deployed on ModelArts and uses API Gateway (APIG). Therefore, OCR error codes include ModelArts and APIG platform error codes.
If an error code starting with APIGW is returned after you call an API, resolve the problem by referring to the instructions provided in Error Codes.
| Module | Error Code | Error Message. | Description | Solution |
|---|---|---|---|---|
| OCR | AIS.0101 | The input parameter is invalid. | The input parameter does not meet the requirements. | Check the entered parameter. For details about the input parameter format of each API, see the request parameters in section "APIs" in Optical Character Recognition API Reference. |
| AIS.0102 | The image format is not supported. | The image format is not supported. | Check the image format. For details about the image formats supported by each service, see Constraints. | |
| AIS.0103 | The image size does not meet the requirements. | The image size does not meet the requirements. | Check the image size. For details about the image size supported by each service, see Constraints. | |
| AIS.0104 | The image is not supported or the image quality is poor. | The image is not supported or is of poor quality. | Check the image type and quality. Check whether the called API is correct. | |
| AIS.0105 | Recognition failed. | Algorithm calculation failed. | Contact HUAWEI CLOUD support personnel. | |
| Platform | ModelArts.0203 | Invalid token. | The token is invalid. | Check whether the token is correct. |
| ModelArts.4101 | Token header cannot be empty. | The token is empty. | The HTTP request header does not contain the token request authentication information of x-auth-token. Check the request. | |
| ModelArts.4102 | Parse Token error. | The token failed to be parsed. | The token request authentication information of x-auth-token in the HTTP request header is incorrect. Check the sent request and token. | |
| ModelArts.4103 | Invalid Token header. | 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. | |
| ModelArts.4104 | Invalid Request Content Length. | The length of the request body is invalid. | Check the request body length. | |
| ModelArts.4105 | The JSON format of the input data is incorrect. | The JSON format of the request body is incorrect. | Check the JSON format of the request body. | |
| ModelArts.4106 | Invalid authorization request. | The account is restricted. | Check the user's resources. For details about the account restriction reason, see My Account FAQ in Help Center. | |
| ModelArts.4107 | Get user temp ak sk error. | An exception occurred when obtaining the temporary AK/SK. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4201 | Request url need service id. | The request URL does not contain the service ID. | Check the service ID in the request URL. | |
| ModelArts.4202 | Request url format invalid. | The request URL format is invalid. | Check the request URL format. | |
| ModelArts.4203 | Access denied! You do not have permission. | Access permission is unavailable. | Check the access permission. | |
| ModelArts.4204 | Access api error! Not subscribe this api. | The API has not been subscribed. | Subscribe to the API. Rectify the fault by following the instructions provided in Why Is a Message Stating "ModelArts.4204" Displayed When the OCR API Is Called? If the API has been enabled, check whether the region (or account) where the service is enabled is the same as the region (or account) where the service is called. If they are the same, check whether the URL of the API is correct. | |
| ModelArts.4301 | Have error when get ai-service admin token. | The service administrator token failed to be obtained. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4302 | Gateway forwarding error. | The serviced failed to be accessed. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4401 | Max concurrency error. | The number of concurrent requests exceeds the upper limit. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4402 | Backend service timeout error. | Service processing timed out. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4403 | Backend service unavailable error. | The service is unavailable because it failed to respond or its failure rate is high. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4502 | Backend service response error. | The service failed to respond. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4503 | Backend service found error. | The service does not exist. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4504 | Backend service api not found. | The API to be accessed does not exist. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4505 | Backend service internal error. | The internal service error occurs. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4506 | SubService service found error. | The subservice corresponding to the API does not exist. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4508 | Service not start. | The service does not exist or is stopped. | Contact HUAWEI CLOUD support personnel. | |
| ModelArts.4601 | The URL is not allowed. | The external URL is invalid. | Check the format of the entered download address. | |
| ModelArts.4603 | Obtaining the file from the URL failed. | The file failed to be downloaded from the external URL. | Check the network and URL. | |
| ModelArts.4702 | Query Obs agency failed. | The OBS agency failed to be queried. | Check whether the OBS agency has been enabled for the service. | |
| ModelArts.4703 | The Obs URL is invalid. | The OBS URL is invalid. | Check the OBS URL. | |
| ModelArts.4704 | Obtaining the file from the OBS failed. | The OBS file failed to be obtained. | Check the OBS file. | |
| ModelArts.4705 | The file stored on the OBS is oversized. | The OBS file is oversized. | Check the size of the OBS file and ensure that the file does not exceed the size limit. | |
| ModelArts.4706 | The Obs file is not exist. | The OBS file does not exist. | Check whether the corresponding file exists. | |
| APIG | APIG.0101 | The API does not exist or has not been published in the environment. | The API does not exist or has not been published. | Check whether the URL of the API is correct, whether the endpoint and the corresponding URI are correct, whether the service is deployed in the target region, and whether the HTTP request method (such as POST and GET) is correct. For details about the endpoint, see Endpoints. For details about the URI, see the API page of each API. |
| APIG.0201 | Backend timeout. | Request timed out. | Rectify the fault by following the instructions provided in Why Is a Message Stating "APIG.0201" Displayed When the OCR API Is Called? | |
| APIG.0301 | Incorrect IAM authentication information. | The IAM authentication information is incorrect.
|
| |
| APIG.0308 | The throttling threshold has been reached: policy user over ratelimit,limit:XX,time:1 minute. | The request exceeds the default rate limit of the service. | Rectify the fault by following the instructions provided in Why Is a Message Stating "APIG.0308" Displayed When the OCR API Is Called? | |
| Other | If other error codes are displayed, contact us. | |||
Last Article: Status Codes
Next Article: Obtaining a Project ID
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.