Updated on 2023-04-25 GMT+08:00

Error Codes

No data is returned if an API fails to be called. You can locate the cause of an error according to the error code of each API. When the API calling fails, HTTP status code 4xx or 5xx is returned. The returned message body contains the specific error code and error information. If you fail to locate the cause of an error, contact Huawei Cloud service support 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.

  • Example exception response
    { 
       "error_code": "FRS.0202", 
       "error_msg": " The service has been freeze."
     }
  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    error_code

    No

    String

    Error code

    error_msg

    No

    String

    Error message

  • Type

    Status Code

    Error Code

    Description

    Measure

    Common service errors

    (error code range: 1–99)

    403

    FRS.0002

    Token authentication failed. The user token is incorrect or has expired.

    Obtain your token again and use the token to call the FRS APIs. For details, see Authentication.

    400

    FRS.0010

    The request header is missing or empty.

    Check whether the common message header is configured. For details, see Making an API Request.

    400

    FRS.0011

    A parameter is missing.

    Check whether the entered parameters are complete.

    400

    FRS.0012

    Request parameters are in incorrect formats.

    Check whether the format of parameters is valid.

    400

    FRS.0013

    The face image size is too large or too small.

    Upload a facial image that meets the requirements.

    The image resolution must be less than 4,096 x 2,160. The face resolution in an image must be greater than 80 x 80. It is recommended that the face resolution be greater than 120 x 120.

    400

    FRS.0014

    The input is not in JSON format.

    Check whether the JSON format of the body is valid.

    400

    FRS.0015

    An error occurred when parsing the Base64 image.

    Re-encode the image and enter the correct Base64 code in the body. Ensure that the code format is the same as that of the example.

    400

    FRS.0016

    The format of the uploaded file is not supported.

    Upload a file in a format that can be recognized. For details, see Restrictions and Limitations.

    400

    FRS.0017

    The uploaded body exceeds the allowed range.

    Check the size of the body parameters. For details, see Restrictions and Limitations.

    500

    FRS.0018

    Internal service error.

    Contact the customer service for assistance.

    400

    FRS.0019

    The service has not been enabled.

    Log in to the FRS management console and enable the sub-service you need.

    400

    FRS.0020

    The sub-service has not been enabled.

    Log in to the FRS management console and enable the sub-service you need.

    400

    FRS.0021

    Invalid OBS URL.

    Check whether the OBS URL is correct by referring to the request example.

    400

    FRS.0022

    Failed to obtain the OBS file.

    Check whether the file exists on OBS and whether the access permission on the file is correct.

    400

    FRS.0023

    The size of the file on OBS exceeds the upper limit.

    Check whether the size of the file on OBS meets the API requirements. For details, see Restrictions and Limitations.

    400

    FRS.0024

    The file does not exist on OBS.

    Check whether the file exists on OBS.

    400

    FRS.0027

    OBS unauthorized.

    Log in to the FRS management console and click Service Authorization in the upper right corner to complete OBS authorization.

    403

    FRS.0028

    The project ID does not match the token.

    Check whether the project ID for obtaining the token is the same as that in the request URL.

    400

    FRS.0029

    The format of filter criteria is incorrect.

    Check whether the input format is valid. For details, see Request Parameters of Face Retrieval.

    400

    FRS.0030

    return_fields is not defined.

    Check whether return_fields is defined. For details, see Request Parameters of Face Retrieval.

    400

    FRS.0031

    The sort field is not contained in the returned fields.

    Check whether the sort field is defined. For details, see Request Parameters of Face Retrieval.

    400

    FRS.0032

    The sort field and type are not supported. Only numeral type is supported.

    The sort field and type are not supported. Only numeral type is supported.

    400

    FRS.0033

    The number of requests has exceeded the traffic control threshold.

    You are advised to control the request policy or retry. You can expand the capacity to increase the QPS quota.

    400

    FRS.0035

    The URL is invalid.

    Check whether the OBS URL is correct by referring to the request example.

    400

    FRS.0036

    Failed to obtain the file from the URL.

    Use the URL provided by OBS to upload the image and check whether the URL is correct.

    Service management errors

    (error code range: 201–300)

    400

    FRS.0201

    The user has been registered.

    The user has been registered.

    400

    FRS.0202

    The service has been frozen.

    Contact the customer service for assistance.

    400

    FRS.0203

    Failed to update user information.

    Check the entered user information.

    Facial image library resource errors

    (error code range: 301–400)

    400

    FRS.0301

    You cannot create an existing facial image library.

    Check the name of the facial image library to be created. If the name already exists, change another name and create it again.

    400

    FRS.0302

    The facial image library does not exist.

    Check whether the input facial image library exists.

    400

    FRS.0304

    No face is detected. Failed to search the face.

    Upload a facial image that meets the requirements. For details, see Restrictions and Limitations.

    400

    FRS.0305

    A new facial image library cannot be created because the number of facial image libraries exceeds the upper limit.

    Check whether the number of facial image libraries exceeds the upper limit or contact the customer service.

    403

    FRS.0306

    New faces cannot be added because the number of faces exceeds the upper limit of a facial image library.

    Add a new facial image library and add faces to it.

    Face resource errors

    (error code range: 401–500)

    400

    FRS.0401

    The value of the corresponding type cannot be found and cannot be deleted.

    For details, see the descriptions of the facial resource management APIs.

    400

    FRS.0402

    The entered field does not exist.

    For details, see the descriptions of the facial resource management APIs.

    400

    FRS.0403

    The face ID does not exist.

    Check whether the face ID exists.

    400

    FRS.0404

    No face is detected. Failed to add the face.

    Upload a facial image that meets the requirements. For details, see Restrictions and Limitations.

    400

    FRS.0405

    The customized field cannot be added because it is not defined.

    Check whether the customized field to be added exists. If the customized field does not exist, create it and then add it.

    400

    FRS.0406

    The imported data type does not match the defined data type.

    Check whether the imported data type is the same as the defined data type.

    400

    FRS.0407

    No matched data is found during batch deletion.

    Check whether the data to be deleted exists.

    Face verification errors

    (error code range: 501–600)

    400

    FRS.0501

    No face is detected in the image.

    Upload a facial image that meets the requirements. For details, see Restrictions and Limitations.

    Face LiveDetect errors

    (error code range: 701–800)

    400

    FRS.0701

    Video parsing error.

    Check whether the video is damaged.

    400

    FRS.0702

    The action is not supported.

    Check whether the entered action exists. For details, see Face LiveDetect.

    400

    FRS.0703

    The action time is invalid.

    Check whether the input is valid. For details, see Face LiveDetect.

    400

    FRS.0704

    The number of imported actions exceeds 10.

    The number of imported actions exceeds 10.

    400

    FRS.0705

    The matching mode is not supported.

    Check whether the input is valid. For details, see Restrictions and Limitations.

    400

    FRS.0706

    The video duration is not allowed. The duration must be 1 to 15 seconds.

    The video duration is not within 1 to 15 seconds. Use a video that meets the duration requirement.

    400

    FRS.0707

    No face is detected in the image.

    Check whether there is a face in the image or whether the face meets the restrictions. For details, see Restrictions and Limitations.

    400

    FRS.0708

    Check whether the quality of the input facial image meets the requirements.

    Check whether the quality of the input facial image meets the requirements. For details, see Restrictions and Limitations.

    400

    FRS.0709

    Check whether the input facial image contains multiple faces.

    Check whether the input facial image contains multiple faces.

    400

    FRS.0751

    Failed to parse video data.

    Check whether the quality of the input facial video meets the requirements. For details, see Restrictions and Limitations.

  • Gateway error code

    Type

    Status Code

    Error Code

    Description

    Measure

    Gateway errors

    (error code range: 1–400)

    404

    APIG.0101

    The API does not exist.

    The request address or URL used for calling the API does not exist or has not been released. Check whether the request address and URL are correct.

    413/504

    APIG.0201

    The request body exceeds the allowed range or the backend times out.

    Check whether the request size is valid. Contact the customer service to check whether the backend service is running properly.

    401

    APIG.0301

    Authentication failed.

    Perform authentication. For details, see Authentication.

    401

    APIG.0307

    The token needs to be updated.

    • The validity period of the token is 24 hours. Obtain the token again to call the API.
    • Check whether the endpoint in the API URL is correct. Services deployed in different regions cannot be called across regions. If APIs in different regions are called, the token is invalid and error code APIG.0307 is displayed.