
# 错误码
#### 功能说明
所有华为云的扩展接口发生错误时，会有自定义错误信息返回，该节为您介绍每个错误码的含义。
#### 返回体格式
```
STATUS CODE 400
```
```
{ 
        "error_code": "AIS.0005",
        "error_msg": "The service does not exist."
  }
```
#### 错误码说明
调用接口出错后，将不会返回结果数据。调用方可根据每个接口对应的错误码来定位错误原因。
返回的消息体中是具体的错误代码及错误信息。在调用方找不到错误原因时，可以联系华为云客服，并提供错误码，以便尽快帮您解决问题。
当您调用API时，如果遇到"APIGW"开头的错误码，请参见[API网关错误码](https://support.huaweicloud.com/devg-apisign/api-sign-errorcode.html)进行处理。
当您调用API时，如果遇到"APIG"开头的错误码，请参见[APIG错误码](https://support.huaweicloud.com/usermanual-apig/apig_03_0048.html)。
| 状态码 | 错误码            | 错误信息                                                                                                                                                                                                                                                                                                                                                                                                                              | 描述                                                                                                                                                                                            | 处理措施                                                                                                                                                                                                                                         |
|:---|:---|:---|:---|:---|
| 400 | AIS.0002       | The authentication token is abnormal.                                                                                                                                                                                                                                                                                                                                                                                             | 验证Token异常。                                                                                                                                                                                    | 请检查Token是否正确。                                                                                                                                                                                                                                |
| 400 | AIS.0003       | Failed to complete the request because of an internal service error.                                                                                                                                                                                                                                                                                                                                                              | 服务内部错误。                                                                                                                                                                                       | 请联系华为云支持人员，请通过[工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/serviceTickets)联系我们。                                                                                                                                    |
| 400 | AIS.0004       | The request is unauthorized.                                                                                                                                                                                                                                                                                                                                                                                                      | 无权限操作。                                                                                                                                                                                        | 服务未开通请开通服务。服务开通请参见[《内容审核快速入门》](https://support.huaweicloud.com/qs-moderation/moderation_07_0001.html)。                                                                                                                                       |
| 400 | AIS.0005       | The service does not exist.                                                                                                                                                                                                                                                                                                                                                                                                       | 服务不存在。                                                                                                                                                                                        | 请检查传入的服务类型或场景是否正确，如果无法解决请联系华为云支持人员，请通过[工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/serviceTickets)联系我们。                                                                                                            |
| 400 | AIS.0007       | The service has not been enabled yet.                                                                                                                                                                                                                                                                                                                                                                                             | 服务未开通。                                                                                                                                                                                        | 请开通服务。开通步骤请参考[开通服务步骤说明](https://support.huaweicloud.com/usermanual-moderation/moderation_05_0002.html)。                                                                                                                                      |
| 400 | AIS.0010       | Lack Header or Header %s is empty.                                                                                                                                                                                                                                                                                                                                                                                                | 缺少Header或者Header为空。                                                                                                                                                                           | HTTP请求缺少必须的header信息，请检查是否有Content-type等必须字段。                                                                                                                                                                                                 |
| 400 | AIS.0011       | Lack the request parameter, or the request parameter %s is empty.                                                                                                                                                                                                                                                                                                                                                                 | 缺少请求参数或者参数为空。                                                                                                                                                                                 | 请检查请求body是否缺少必须字段，请参考对应API的请求说明。                                                                                                                                                                                                             |
| 400 | AIS.0012       | The request parameter %s is not supported.                                                                                                                                                                                                                                                                                                                                                                                        | 请求参数不支持。                                                                                                                                                                                      | 请检查请求中的字段不合法，请参考对应API的请求说明。                                                                                                                                                                                                                  |
| 400 | AIS.0013       | The request method %s is not allowed, allow is %s.                                                                                                                                                                                                                                                                                                                                                                                | 请求方法不允许。                                                                                                                                                                                      | 请检查请求方法是否正确。                                                                                                                                                                                                                                 |
| 400 | AIS.0014       | The JSON format of the input data is incorrect.                                                                                                                                                                                                                                                                                                                                                                                   | 输入数据JSON格式错误。                                                                                                                                                                                 | 请检查输入数据的JSON格式。                                                                                                                                                                                                                              |
| 400 | AIS.0015       | Base64 decoding of the input data is incorrect.                                                                                                                                                                                                                                                                                                                                                                                   | 输入数据BASE64解码错误。                                                                                                                                                                               | 图片的Base64编码错误，请检查Base64内容。                                                                                                                                                                                                                   |
| 400 | AIS.0020       | The size of the request body is out of the range %s.                                                                                                                                                                                                                                                                                                                                                                              | 请求体大小超过限制。                                                                                                                                                                                    | 请检查请求体大小。                                                                                                                                                                                                                                    |
| 400 | AIS.0021       | The requested file type is not supported.                                                                                                                                                                                                                                                                                                                                                                                         | 请求的文件类型不支持。                                                                                                                                                                                   | 请检查请求的文件类型。                                                                                                                                                                                                                                  |
| 400 | AIS.0022       | The URL is invalid.                                                                                                                                                                                                                                                                                                                                                                                                               | URL不合法。                                                                                                                                                                                       | 请检查输入的url格式。                                                                                                                                                                                                                                 |
| 400 | AIS.0023       | The file stored on the OBS is oversized %s.                                                                                                                                                                                                                                                                                                                                                                                       | 存储在OBS上的文件过大。                                                                                                                                                                                 | 检查图片格式是否是服务支持的格式。具体请参见[《内容审核使用限制》](https://support.huaweicloud.com/productdesc-moderation/moderation_01_0004.html)。                                                                                                                          |
| 400 | AIS.0024       | Obtaining the file from the OBS failed. %s.                                                                                                                                                                                                                                                                                                                                                                                       | 从OBS上获取文件失败。                                                                                                                                                                                  | 原因可能为签名过期或签名验证未通过等。                                                                                                                                                                                                                          |
| 400 | AIS.0025       | The file stored in OBS is empty.                                                                                                                                                                                                                                                                                                                                                                                                  | 存储在OBS上的文件为空。                                                                                                                                                                                 | 请先上传文件到OBS上。                                                                                                                                                                                                                                 |
| 400 | AIS.0026       | The token is domain scope, please use project scope.                                                                                                                                                                                                                                                                                                                                                                              | token类型错误。                                                                                                                                                                                    | 应使用project类型的token。                                                                                                                                                                                                                          |
| 400 | AIS.0027       | The account has been frozen.                                                                                                                                                                                                                                                                                                                                                                                                      | 此账户已被冻结。                                                                                                                                                                                      | 请检查是否账户是否欠费。                                                                                                                                                                                                                                 |
| 400 | AIS.0029       | Obtaining the file from out net failed.                                                                                                                                                                                                                                                                                                                                                                                           | 从外网下载文件失败。                                                                                                                                                                                    | 检查文件url是否正确以及是否在支持的范围内。                                                                                                                                                                                                                      |
| 400 | AIS.0030       | Job not found                                                                                                                                                                                                                                                                                                                                                                                                                     | 任务未找到。                                                                                                                                                                                        | 任务已过期被清理了或者传入的job id错误。请检查job id是否正确。                                                                                                                                                                                                        |
| 400 | AIS.0031       | Total number of unfinished jobs over limit %s.                                                                                                                                                                                                                                                                                                                                                                                    | 未处理完的任务总数达到限制。                                                                                                                                                                                | 暂停提交新任务。                                                                                                                                                                                                                                     |
| 400 | AIS.0041       | The language is not supported.                                                                                                                                                                                                                                                                                                                                                                                                    | 不支持该语种。                                                                                                                                                                                       | 传入该局点支持的语种。具体支持的语种请参考[表3 请求Body参数](https://support.huaweicloud.com/api-moderation/moderation_03_0069.html#moderation_03_0069__request_TextDetectionReq)中language中的描述。                                                                        |
| 400 | AIS.0502       | Check whether the Base64 encoding and URL of the image are correct.                                                                                                                                                                                                                                                                                                                                                               | 检查图像base64以及url是否正确。                                                                                                                                                                          | 请检查图片base64编码是否正常，检查图片格式是否是服务支持的格式。                                                                                                                                                                                                          |
| 400 | AIS.0401       | The input parameter is incorrect.                                                                                                                                                                                                                                                                                                                                                                                                 | 输入参数有误。                                                                                                                                                                                       | 请输入正确的参数。                                                                                                                                                                                                                                    |
| 400 | AIS.0405       | An internal error occurs.                                                                                                                                                                                                                                                                                                                                                                                                         | 内部错误。                                                                                                                                                                                         | 请联系华为云支持人员，请通过[工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/serviceTickets)联系我们。                                                                                                                                    |
| 400 | AIS.0411       | The image format is invalid.                                                                                                                                                                                                                                                                                                                                                                                                      | 图片格式无效。                                                                                                                                                                                       | 请上传正确格式的图片。                                                                                                                                                                                                                                  |
| 400 | AIS.0039       | Repetitive push stream.                                                                                                                                                                                                                                                                                                                                                                                                           | 重复推流，重复创建审核作业。                                                                                                                                                                                | 如果没有回调预期的审核结果，对该流创建审核作业又提示重复推流，您可以关闭该审核作业，然后对该流重新创建审核作业。                                                                                                                                                                                     |
| 400 | AIS.0701       | The video URL is invalid.                                                                                                                                                                                                                                                                                                                                                                                                         | 视频url无效                                                                                                                                                                                       | 检查url参数是否有效。                                                                                                                                                                                                                                 |
| 400 | AIS.0702       | The video URL connects failed.                                                                                                                                                                                                                                                                                                                                                                                                    | 视频链接失败                                                                                                                                                                                        | 检查url参数是否能够链接。                                                                                                                                                                                                                               |
| 400 | AIS.0703       | The video size is unknown.                                                                                                                                                                                                                                                                                                                                                                                                        | 视频url头中不包含大小                                                                                                                                                                                  | 检查url参数是否有效。                                                                                                                                                                                                                                 |
| 400 | AIS.0704       | The video size must not exceed 300.0MB.                                                                                                                                                                                                                                                                                                                                                                                           | 视频大小超过300MB                                                                                                                                                                                   | 检查待审核视频文件大小是否在300MB以内。                                                                                                                                                                                                                       |
| 400 | AIS.0705       | The video type is invalid.                                                                                                                                                                                                                                                                                                                                                                                                        | 视频格式无效                                                                                                                                                                                        | 检查待审核视频是否是当前内容审核支持的格式。                                                                                                                                                                                                                       |
| 400 | AIS.0706       | The video is corrupted.                                                                                                                                                                                                                                                                                                                                                                                                           | 视频文件损坏                                                                                                                                                                                        | 检查待审核视频文件是否损坏。                                                                                                                                                                                                                               |
| 400 | AIS.0708       | The video downloads failed.                                                                                                                                                                                                                                                                                                                                                                                                       | 视频下载失败                                                                                                                                                                                        | 检查url是否有效，如确认有效，请联系华为云支持人员，通过工单联系我们。                                                                                                                                                                                                         |
| 400 | AIS.0709       | Video detection process occurred error: \[错误信息\]                                                                                                                                                                                                                                                                                                                                                                                  | 视频审核过程中发生错误，错误信息按照实际内容补充                                                                                                                                                                      | 请联系华为云支持人员，通过工单联系我们。                                                                                                                                                                                                                         |
| 400 | AIS.0710       | Invalid video length. It must be \<= 2 hours. The input video duration is \[%s\].                                                                                                                                                                                                                                                                                                                                                 | 视频时长超过2小时                                                                                                                                                                                     | 检查待审核视频时长是否在2小时以内。                                                                                                                                                                                                                           |
| 400 | AIS.0711       | Invalid video resolution. Width and High must in \[20,6000\]                                                                                                                                                                                                                                                                                                                                                                      | 视频分辨率无效                                                                                                                                                                                       | 检查待审核视频分辨率长宽是否均在20-6000像素以内。                                                                                                                                                                                                                 |
| 400 | APIG.0101      | The API does not exist or has not been published.                                                                                                                                                                                                                                                                                                                                                                                 | 您所访问的API不存在或尚未在环境中发布。                                                                                                                                                                         | 请检查输入的api信息是否正确，是否该服务存在对应的区域中。检查API的URL是否拼写正确，HTTP请求方法（POST，GET等）是否正确，请检查服务调用配置的域名和uri信息是否正确，域名可参考[域名](https://developer.huaweicloud.com/endpoint?Moderation)。                                                                               |
| 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.IAM身份验证信息不正确：解密令牌失败，检查输入的token是否完整。 2.token有效期为24小时，token超时，重新传入获取token值。 3.因为AK/SK认证失败，请检查AK/SK是否正确，账号是否因欠费等原因权限被限制。 | decrypt token fail：发送的HTTP请求header中x-auth-token的token请求认证信息错误，请检查发送的请求和token。 token expires：token超时，请重新获取新token传入。 verify aksk signature fail：请检查AK、SK是否正确，账号是否欠费。 |
| 400 | APIG.0201      | The request body is oversized.                                                                                                                                                                                                                                                                                                                                                                                                    | 请求体过大。                                                                                                                                                                                        | 请检查请求的body体是否过大，具体请参见[《内容审核使用限制》](https://support.huaweicloud.com/productdesc-moderation/moderation_01_0004.html)，进行调整。                                                                                                                      |
| 400 | APIG.0308      | The request is sent too fast and exceeds the default rate limit of the service.                                                                                                                                                                                                                                                                                                                                                   | 请求发送太快，超过了服务的默认配置限流。                                                                                                                                                                          | 请求发送太快，达到了API的限速阈值，请降低请求速度。如有更高请求速度要求，请联系华为云支持人员，请通过[工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/serviceTickets)联系我们。                                                                                              |
| 400 | ModelArts.0203 | Invalid token.                                                                                                                                                                                                                                                                                                                                                                                                                    | 非法Token。                                                                                                                                                                                      | 请检查Token是否正确。                                                                                                                                                                                                                                |
| 400 | ModelArts.4101 | The token is empty.                                                                                                                                                                                                                                                                                                                                                                                                               | Token为空。                                                                                                                                                                                      | 发送的HTTP请求header中没有带x-auth-token的token请求认证信息，请检查发送的请求。                                                                                                                                                                                        |
| 400 | ModelArts.4102 | Failed to parse the token.                                                                                                                                                                                                                                                                                                                                                                                                        | 解析Token失败。                                                                                                                                                                                    | 发送的HTTP请求header中x-auth-token的token请求认证信息错误，请检查发送的请求和token。                                                                                                                                                                                   |
| 400 | ModelArts.4103 | The token is invalid.                                                                                                                                                                                                                                                                                                                                                                                                             | Token不合法。                                                                                                                                                                                     | 发送的HTTP请求header中x-auth-token的token请求认证信息错误，请检查发送的请求和token。                                                                                                                                                                                   |
| 400 | ModelArts.4104 | The length of the request body is invalid.                                                                                                                                                                                                                                                                                                                                                                                        | 请求body体长度不合法。                                                                                                                                                                                 | 请检查请求body体长度。                                                                                                                                                                                                                                |
| 400 | ModelArts.4105 | The JSON format of the request body is incorrect.                                                                                                                                                                                                                                                                                                                                                                                 | 请求body体json格式不对。                                                                                                                                                                              | 请检查请求body体是否符合json格式。                                                                                                                                                                                                                        |
| 400 | ModelArts.4106 | The account is restricted.                                                                                                                                                                                                                                                                                                                                                                                                        | 用户账号受限。                                                                                                                                                                                       | 请检查用户资源状态，账号受限原因请参考账号中心相关描述。                                                                                                                                                                                                                 |
| 400 | ModelArts.4107 | An exception occurred when obtaining the temporary AK/SK.                                                                                                                                                                                                                                                                                                                                                                         | 获取用户临时AK，SK异常。                                                                                                                                                                                | 请联系华为云支持人员，通过[工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/serviceTickets)联系我们。                                                                                                                                     |
| 400 | ModelArts.4201 | The request URL does not contain the service ID.                                                                                                                                                                                                                                                                                                                                                                                  | 请求url中需要包含服务ID。                                                                                                                                                                               | 请检查请求url中的服务ID。                                                                                                                                                                                                                              |
| 400 | ModelArts.4202 | The request URL format is invalid.                                                                                                                                                                                                                                                                                                                                                                                                | 请求url格式不合法。                                                                                                                                                                                   | 请检查请求url格式。                                                                                                                                                                                                                                  |
| 400 | ModelArts.4203 | No access permission.                                                                                                                                                                                                                                                                                                                                                                                                             | 没有权限访问。                                                                                                                                                                                       | 请检查访问权限。                                                                                                                                                                                                                                     |
| 400 | ModelArts.4204 | Request api error! The API is not subscribed.                                                                                                                                                                                                                                                                                                                                                                                     | 没有订阅该API。                                                                                                                                                                                     | 请订阅该API，订阅API请参考服务介绍[开通申请服务](https://support.huaweicloud.com/qs-moderation/moderation_07_0001.html)。如已开通服务，请检查开通服务的区域与服务调用的一致，如果一致请检查API的URL是否拼写正确，HTTP请求方法（POST，GET等）是否正确。                                                                  |
| 400 | ModelArts.4601 | The external URL is invalid.                                                                                                                                                                                                                                                                                                                                                                                                      | 外网下载地址不合法。                                                                                                                                                                                    | 请检查输入的url下载地址参数格式。                                                                                                                                                                                                                           |
| 400 | ModelArts.4603 | The file failed to be downloaded from the external URL.                                                                                                                                                                                                                                                                                                                                                                           | 下载外网URL文件失败。                                                                                                                                                                                  | 请检查输入的url是否可下载。                                                                                                                                                                                                                              |
| 400 | ModelArts.4702 | The OBS agency failed to be queried.                                                                                                                                                                                                                                                                                                                                                                                              | 查询OBS委托失败。                                                                                                                                                                                    | 请检查是否已开通给服务的OBS委托。                                                                                                                                                                                                                           |
| 400 | ModelArts.4703 | The OBS URL is invalid.                                                                                                                                                                                                                                                                                                                                                                                                           | OBS地址不合法。                                                                                                                                                                                     | 请检查输入的OBS的url地址。                                                                                                                                                                                                                             |
| 400 | ModelArts.4704 | Failed to obtain the OBS file.                                                                                                                                                                                                                                                                                                                                                                                                    | 获取OBS文件失败。                                                                                                                                                                                    | 下载OBS文件失败，请检查对应的文件是否存在。                                                                                                                                                                                                                      |
| 400 | ModelArts.4705 | The OBS file is oversized.                                                                                                                                                                                                                                                                                                                                                                                                        | OBS文件大小超限。                                                                                                                                                                                    | 请使用符合服务大小限制的文件作为输入，具体请参见[《内容审核使用限制》](https://support.huaweicloud.com/productdesc-moderation/moderation_01_0004.html)。                                                                                                                        |
| 400 | ModelArts.4706 | The OBS file does not exist.                                                                                                                                                                                                                                                                                                                                                                                                      | OBS文件不存在。                                                                                                                                                                                     | 下载OBS文件失败，请检查对应的文件是否存在。                                                                                                                                                                                                                      |
| 400 | 其他             | 如果出现其他无法解决的错误码，请通过[工单](https://console.huaweicloud.com/ticket/?locale=zh-cn#/ticketindex/serviceTickets)联系我们。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |||
   
