1. 错误码
服务端错误码表,HttpCode是5xx,表示服务不可用。此时一般建议重试或联系商品页面的API服务商。
客户端错误码表,HttpCode为4xx,表示业务报错。此时一般为参数错误、签名错误、请求方式有误或被流控限制等业务类错误。建议详细查看错误码,针对性解决问题。
状态码 | 错误码 | 理由 | 语义 | 解决方案 |
---|---|---|---|---|
500 | 10001 | Internal Error | API 网关内部错误 | 建议重试。 |
500 | 10002 | Failed To Invoke Backend Service | 底层服务错误 | API 提供者底层服务错误,建议重试,如果重试多次仍然不可用,可联系 API 服务商解决。 |
503 | 10001 | Service Unavailable | 服务不可用 | 建议稍后重试。 |
504 | 10001 | Async Service | 后端服务超时 | 建议稍后重试。 |
403 | 10001 | Throttled by USER Flow Control | 因用户流控被限制 | 一般是由于 API 服务商设置的用户流控值导致被流控,可以联系 API 服务商协商放宽限制。 |
403 | 10001 | Throttled by APP Flow Control | 因APP流控被限制 | 一般是由于 API 服务商设置的 APP 流控值导致被流控,可以联系 API 服务商协商放宽限制。 |
403 | 10001 | Throttled by API Flow Control | 因 API 流控被限制 | 一般是由于 API 服务商设置的 API 流控值导致被流控,可以联系 API 服务商协商放宽限制。 |
403 | 10001 | MAIN Flow Control | 因二级域名流控被限制,或因分组流控被限制 | 直接访问二级域名调用 API,每天被访问次数上限1000次。每个分组被访问的QPS限制为500。 |
403 | 10001 | Quota Exhausted | 调用次数已用完 | 购买的次数已用完。 |
403 | 10001 | Expiry of Authorization | 已经超出api授权时间范围 | 重新授权,按需选择授权时间范围 |
403 | 10001 | Quota Expired | 购买次数已过期 | 购买的次数已经过期。 |
403 | 10001 | User Arrears | 用户已欠费 | 请尽快充值续费。 |
403 | 10001 | User Arrears | 用户已欠费 | 请尽快充值续费。 |
400 | 10001 | Empty Request Body | body 为空 | 请检查请求 Body 内容。 |
400 | 10001 | Invalid Request Body | body 无效 | 请检查请求 Body。 |
400 | 10001 | Invalid Param Location | 参数位置错误 | 请求参数位置错误。 |
400 | 10001 | Unsupported Multipart | 不支持上传 | 不支持上传文件。 |
400 | 10001 | Invalid Url | Url 无效 | 请求的 Method、Path 或者环境不对。请参照错误说明 Invalid Url。 |
400 | 10001 | Invalid Domain | 域名无效 | 请求域名无效,根据域名找不到 API。请联系 API 服务商。 |
400 | 10001 | Invalid HttpMethod | HttpMethod 无效 | 输入的 Method 不合法。 |
400 | 10001 | Invalid AppKey | AppKey 无效或不存在 | 请检查传入的 AppKey。注意左右空格的影响。 |
400 | 10001 | Invalid AppSecret | APP 的Secret 错误 | 检查传入的 AppSecret。注意左右空格的影响。 |
400 | 10001 | Timestamp Expired | 时间戳过时 | 请核对请求系统时间是否为标准时间。 |
400 | 10001 | Invalid Timestamp | 时间戳不合法 | 请参照 请求签名说明文档。 |
401 | 10001 | Empty Signature | 签名为空 | 请传入签名字符串,请参照 请求签名说明文档。 |
400 | 10001 | Invalid Signature, Server StringToSign:%s | 签名无效 | 签名无效,参照 Invalid Signature 错误说明 |
400 | 10001 | Invalid Content-MD5 | Content-MD5 值不合法 | 请求 Body 为空,但传入了 MD5 值,或 MD5 值计算错误。请参照 请求签名说明文档。 |
403 | 10001 | Unauthorized | 未被授权 | APP 未获得要调用的 API 的授权。请参照错误说明 Unauthorized。 |
400 | 10001 | Nonce Used | SignatureNonce 已被使用一次 | SignatureNonce 不能被重复使用。 |
400 | 10001 | API Not Found | 找不到 API | 传入的 GroupId、Stage 等参数不正确,或已下线。 |
401 | 10001 | OpenID Connect Verify Fail: 243, Not found by keyId:%s | OpenID Connect 认证失败 | 检查下列项:1.请检查您是否使用了您本地demo代码生成的token, token必须由授权API在部署环境生成。2.获取授权API,业务API,这两者的的安全认证都必须是OpenID Connect类型。3.配置获取授权API时,KeyId和公钥一定要与后端代码实际使用的参数一致。 |
1.1. 当您调用API网关开放的管控OpenAPI时,如CreateAPI、ModifyAPI、DeleteAPI等,您可能遇到以下错误码。
服务端错误码,HttpCode为5xx,表示服务不可用。此时建议重试。
状态码 | 错误码 | 理由 | 描述 | 语义 | 解决方案 |
---|---|---|---|---|---|
503 | 10001 | ServiceUnavailable. | The request has failed due to a temporary failure of the server. | 服务不可用 | 建议重试。 |
500 | 10001 | InternalError. | The request processing has failed due to some unknown error, exception or failure. | 内部错误 | 建议重试。 |
客户端错误码,HttpCode为4xx,表示业务错误。一般为参数错误、权限限制、业务逻辑错误等问题,此时需要仔细查看错误码,并针对性解决问题。
状态码 | 错误码 | 理由 | 描述 | 语义 | 解决方案 |
---|---|---|---|---|---|
400 | 10001 | Repeated%s | The specified %s is repeated. | 某参数重复(%s 是占位符,实际调用会给出明确的参数名或提示。) | 建议按照提示修改重复的参数后重试。 |
400 | 10001 | RepeatedCommit | Resubmit request. | 请求重复 | 请不要频繁提交请求。 |
状态码 | 错误码 | 理由 | 描述 | 语义 | 解决方案 |
---|---|---|---|---|---|
400 | 400 | Missing%s | The %s is mandatory for this action. | 缺少参数 %s | 根据具体返回补充缺少的参数,重试请求。 |
400 | 400 | MissingAppIdOrAppOwner | AppId or AppOwner must have a valid value. | 缺少参数 AppId 或者 AppOwner | 参数 AppId 和 AppOwner 不能同时为空。 |
400 | 400 | Invalid%s | The specified parameter %s value is not valid. | 参数无效 | 根据返回提示的具体参数,查看相关参数约束,修改后重试。 |
400 | 400 | NotFound%s | Cannot find resource according to your specified %s. | 找不到资源 | 根据指定的参数%s找不到资源,建议检查%s是否正确。 |
400 | 400 | InvalidFormat%s | The specified parameter %s value is not well formatted. | 参数格式错误 | 建议根据实际返回提示,查看%s的格式要求,修改后重试。 |
400 | 400 | Duplicate%s | The specified parameter %s value is duplicate. | 参数重复 | 某请求参数不允许重复,建议检查修正后重试。 |
400 | 400 | DependencyViolation%s | The specified %s has %s definitions. | 参数依赖错误 | 指定参数被依赖,不能随意删除,请先解除依赖。 |
403 | 403 | Forbidden%s | Not allowed to operate on the specified %s. | 无权操作/操作禁止 | 您无权执行该操作。 |
403 | 403 | NoPermission | User is not authorized to operate on the specified resource. | 无权操作 | RAM 鉴权不通过。 |
400 | 400 | ExceedLimit%s | The specified %s count exceeds the limit. | 超出个数限制 | 一般指用户账户下创建的 API、API 分组或者APP超出个数限制。 |
404 | 404 | UserNotFound | The specified user can not be found. | 指定用户找不到 | 根据输入的用户信息找不到该用户。 |
400 | 400 | DomainCertificateNotFound | Cannot find the domain certificate. | 指定域名证书不存在 | 建议检查传入的证书 ID 及名称。 |
400 | 400 | DomainNotResolved | The specified domain has not been resolved. | 指定域名未解析 | 需要将指定域名 CNAME 解析到分组的二级域名上,才能完成绑定。域名解析是在用户域名购买的网站上操作。 |
400 | 400 | InvalidICPLicense | The specified domain have not got ICP license, or the ICP license does not belong to Aliyun. | 域名备案不合格 | 要绑定的域名需要在阿里云做首次备案,已经在其他系统做备案的,需要在阿里云备案接入。备案接入需要获取备案号,在阿里云有 ECS 且具有公网 IP 的,每个 ECS 有5个备案号。 |
400 | 400 | Invalid%s.LengthLimit | The parameter %s length exceeds the limit. | 长度超限 | 参数%s超出长度限制,建议修正后重试。 |
400 | 400 | InvalidApiDefault | The ApiDefault value exceeds limit. | 流控 API 默认值超过限制值 | 该值数值不能超过1亿,与单位无关。如需上调请提工单申请。 |
400 | 400 | InvalidAppDefault | The AppDefault value must smaller than the UserDefault and ApiDefault. | AppDefault 的值不符合规则 | 该值需要小于 API 流控值和用户流控值。 |
400 | 400 | InvalidUserDefault | The UserDefault value must bigger than the AppDefault and smaller than the ApiDefault. | UserDefault 的值不符合规则 | 该值需要小于 API 流控值并大于 APP 流控值。 |
400 | 400 | InvalidParamMapping | Parameters must be fully mapped. | 参数映射无效 | 创建 API 时,前后端参数映射需要是全映射。即每个入参都需要配置后端参数名称。 |
400 | 400 | InvalidOwnerAccount | OwnerAccount is invalid. | APP所有者账号无效 | 一般为操作授权时,输入目标用户的阿里云邮箱账号,该账号无效。建议检查修正后重试。 |
400 | 400 | ServiceForbidden | Your Gateway service is forbidden by risk control. | API 网关服务被风控(应该使用户被风控吧) | 请注意不要频繁请求,建议稍后重试。若重试后仍未解决,可提工单咨询。 |
400 | 400 | ServiceUnOpen | Your Gateway service has not been opened. | 服务未开通 | 建议到阿里云官网开通一下 API 网关服务。 |
400 | 400 | ServiceInDept | Your API Gateway service is in dept. | (您的 API 网关)服务欠费 | 充值或者结算后重新开始使用。 |
400 | 400 | EqualSignature | The new signature is the same as the old. | 新密钥与旧的相等 | 修改后端签名密钥时,新设置的 Key 和 Secret 不能跟原来的一样。 |
400 | 400 | CertificateNotMatch | The domain does not match the one in the certificate. | 证书不匹配 | 指定域名与证书内域名不匹配。 |
400 | 400 | CertificateKeyNotMatch | The certificate private key does not match the public key. | 证书密钥不匹配 | 证书的公钥和私钥不匹配。 |
400 | 400 | PrivateKeyEncrypted | The certificate private key is encrypted, please upload the unencrypted version. | 密钥不能加密 | 证书私钥加密了,要求上传不加密的版本。 |
400 | 400 | CertificateSecretKeyError | The certificate private key is invalid. | 证书私钥错误 | 建议检查后重新传入。 |
400 | 400 | InvalidApiServiceAddress | The specified service address is not valid. | API 后端服务地址无效 | 配置的 API 后端服务地址无效。 |
客户端公用错误码,HttpCode为4xx,调用全阿里云产品的OpenAPI均可能遇到,表示业务错误。一般为请求格式错误、请求方式错误、必填参数丢失、参数格式错误、签名错误、流控限制等问题。此时需查看具体错误码,针对性解决问题。
状态码 | 错误码 | 错误理由 | 描述 | 语义 | 解决方案 |
---|---|---|---|---|---|
400 | 400 | Repeated%s | The specified %s is repeated. | 某参数重复(%s 是占位符,实际调用会给出明确的参数名或提示。) | 建议按照提示修改重复的参数后重试。 |
400 | 400 | RepeatedCommit | Resubmit request. | 请求重复 | 请不要频繁提交请求。 |
400 | 400 | Missing%s | The %s is mandatory for this action. | 缺少参数 %s | 根据具体返回补充缺少的参数,重试请求。 |
400 | 400 | MissingAppIdOrAppOwner | AppId or AppOwner must have a valid value. | 缺少参数 AppId 或者 AppOwner | 参数 AppId 和 AppOwner 不能同时为空。 |
400 | 400 | Invalid%s | The specified parameter %s value is not valid. | 参数无效 | 根据返回提示的具体参数,查看相关参数约束,修改后重试。 |
400 | 400 | NotFound%s | Cannot find resource according to your specified %s. | 找不到资源 | 根据指定的参数%s找不到资源,建议检查%s是否正确。 |
400 | 400 | InvalidFormat%s | The specified parameter %s value is not well formatted. | 参数格式错误 | 建议根据实际返回提示,查看%s的格式要求,修改后重试。 |
400 | 400 | Duplicate%s | The specified parameter %s value is duplicate. | 参数重复 | 某请求参数不允许重复,建议检查修正后重试。 |
400 | 400 | DependencyViolation%s | The specified %s has %s definitions. | 参数依赖错误 | 指定参数被依赖,不能随意删除,请先解除依赖。 |
403 | 403 | Forbidden%s | Not allowed to operate on the specified %s. | 无权操作/操作禁止 | 您无权执行该操作。 |
403 | 403 | NoPermission | User is not authorized to operate on the specified resource. | 无权操作 | RAM 鉴权不通过。 |
400 | 400 | ExceedLimit%s | The specified %s count exceeds the limit. | 超出个数限制 | 一般指用户账户下创建的 API、API 分组或者APP超出个数限制。 |
404 | 404 | UserNotFound | The specified user can not be found. | 指定用户找不到 | 根据输入的用户信息找不到该用户。 |
400 | 400 | DomainCertificateNotFound | Cannot find the domain certificate. | 指定域名证书不存在 | 建议检查传入的证书 ID 及名称。 |
400 | 400 | DomainNotResolved | The specified domain has not been resolved. | 指定域名未解析 | 需要将指定域名 CNAME 解析到分组的二级域名上,才能完成绑定。域名解析是在用户域名购买的网站上操作。 |
400 | 400 | InvalidICPLicense | The specified domain have not got ICP license, or the ICP license does not belong to Aliyun. | 域名备案不合格 | 要绑定的域名需要在阿里云做首次备案,已经在其他系统做备案的,需要在阿里云备案接入。备案接入需要获取备案号,在阿里云有 ECS 且具有公网 IP 的,每个 ECS 有5个备案号。 |
400 | 400 | Invalid%s.LengthLimit | The parameter %s length exceeds the limit. | 长度超限 | 参数%s超出长度限制,建议修正后重试。 |
400 | 400 | InvalidApiDefault | The ApiDefault value exceeds limit. | 流控 API 默认值超过限制值 | 该值数值不能超过1亿,与单位无关。如需上调请提工单申请。 |
400 | 400 | InvalidAppDefault | The AppDefault value must smaller than the UserDefault and ApiDefault. | AppDefault 的值不符合规则 | 该值需要小于 API 流控值和用户流控值。 |
400 | 400 | InvalidUserDefault | The UserDefault value must bigger than the AppDefault and smaller than the ApiDefault. | UserDefault 的值不符合规则 | 该值需要小于 API 流控值并大于 APP 流控值。 |
400 | 400 | InvalidParamMapping | Parameters must be fully mapped. | 参数映射无效 | 创建 API 时,前后端参数映射需要是全映射。即每个入参都需要配置后端参数名称。 |
400 | 400 | InvalidOwnerAccount | OwnerAccount is invalid. | APP所有者账号无效 | 一般为操作授权时,输入目标用户的阿里云邮箱账号,该账号无效。建议检查修正后重试。 |
400 | 400 | ServiceForbidden | Your Gateway service is forbidden by risk control. | API 网关服务被风控(应该使用户被风控吧) | 请注意不要频繁请求,建议稍后重试。若重试后仍未解决,可提工单咨询。 |
400 | 400 | ServiceUnOpen | Your Gateway service has not been opened. | 服务未开通 | 建议到阿里云官网开通一下 API 网关服务。 |
400 | 400 | ServiceInDept | Your API Gateway service is in dept. | (您的 API 网关)服务欠费 | 充值或者结算后重新开始使用。 |
400 | 400 | EqualSignature | The new signature is the same as the old. | 新密钥与旧的相等 | 修改后端签名密钥时,新设置的 Key 和 Secret 不能跟原来的一样。 |
400 | 400 | CertificateNotMatch | The domain does not match the one in the certificate. | 证书不匹配 | 指定域名与证书内域名不匹配。 |
400 | 400 | CertificateKeyNotMatch | The certificate private key does not match the public key. | 证书密钥不匹配 | 证书的公钥和私钥不匹配。 |
400 | 400 | PrivateKeyEncrypted | The certificate private key is encrypted, please upload the unencrypted version. | 密钥不能加密 | 证书私钥加密了,要求上传不加密的版本。 |
400 | 400 | CertificateSecretKeyError | The certificate private key is invalid. | 证书私钥错误 | 建议检查后重新传入。 |
400 | 400 | InvalidApiServiceAddress | The specified service address is not valid. | API 后端服务地址无效 | 配置的 API 后端服务地址无效。 |
客户端公用错误码,HttpCode为4xx,调用全阿里云产品的OpenAPI均可能遇到,表示业务错误。一般为请求格式错误、请求方式错误、必填参数丢失、参数格式错误、签名错误、流控限制等问题。此时需查看具体错误码,针对性解决问题。
状态码 | 状态码 | 错误理由 | 错误提示 | 语义 | 解决方案 |
---|---|---|---|---|---|
404 | 404 | InvalidApi.NotFound | Specified api is not found, please check your url and method. | API 找不到。 | 请检查指定的 action 接口名称是否正确,注意大小写区分。 |
400 | 400 | Missing{ParameterName} | {ParameterName} is mandatory for this action. | 缺少必填参数。 | 指定参数为必填参数,请传入。 |
404 | 404 | InvalidAccessKeyId.NotFound | Specified access key is not found. | AccessKeyId 找不到 | 请检查调用时是否传入正确的 AccessKeyId。 |
400 | 400 | InvalidAccessKeyId.Inactive | Specified access key is disabled. | AccessKeyId 被禁用。 | 检查 AK 是否可用。 |
400 | 400 | InvalidTimeStamp.Format | Specified time stamp or date value is not well formatted. | 时间戳格式不对( Date 和 Timestamp)。 | 检查时间戳。 |
400 | 400 | InvalidTimeStamp.Expired | Specified time stamp or date value is expired. | 用户时间和服务器时间超过15分钟。 | 检查时间戳。 |
400 | 400 | SignatureNonceUsed | Specified signature nonce was used already. | SignatureNonce 重复 | |
400 | 400 | InvalidParameter.Format | Specified parameter format is not valid. | 返回值格式不正确。 | 仅支持 XML/JSON。 |
400 | 400 | Invalid{ParameterName} | Specified parameter {ParameterName} is not valid. | 参数值校验不通过。 | 请检查指定参数的值。 |
400 | 400 | UnsupportedHTTPMethod | Specified signature is not matched with our calculation. | Http 请求方法不支持。 | 请检查请求Method。 |
400 | 400 | InvalidSignatureMethod | Specified signature method is not valid. | 签名方法不支持。 | 默认可以不填写该值。 |
400 | 400 | SignatureDoesNotMatch | Specified signature is not matched with our calculation. | 签名不通过。 | 签名不通过。 |
400 | 400 | Throttling.User | Request was denied due to user flow control. | 用户调用频率超限。 | 请稍后访问,降低访问频率。 |
400 | 400 | Throttling.API | Request was denied due to api flow control. | API 访问频率超限。 | 请稍后访问,降低访问频率。 |
400 | 400 | MissingSecurityToken | SecurityToken is mandatory for this action. | 缺少AccessKeyId。 | 请检查是否传入有效AccessKeyId。 |