常见错误码
更新时间:2020-05-15
API网关转发错误码
错误码 | 错误信息 | HTTP状态码 | 含义 | 解决方法 |
---|---|---|---|---|
ResourceNotFound | Resource not found. | 404 | API不存在 | 检查请求的方法、路径、参数等是否正确,是否与已发布的API对应。注意,如果API中定义了必选参数,则请求的Header或Query中必须出现该参数。 |
SignatureEmpty | Signature is empty. | 400 | 签名为空 | 检查请求头中是否包含签名头 |
SignatureInvalid | Signature is invalid: Signature format is invalid. | 400 | 签名格式错误 | 检查签名格式是否正确 |
SignatureAppInvalid | Signature is invalid: App authorization failed. | 400 | APP认证失败 | 签名所用AppKey或AppCode不存在 |
SignatureTimestampInvalid | Signature is invalid: Timestamp is invalid. | 400 | 签名时间戳错误 | 检查签名中的时间戳格式是否正确 |
SignatureTimestampExpired | Signature is invalid: Timestamp is expired. | 400 | 签名已过期 | 重新计算签名 |
SignatureMismatch | Signature is invalid: Signature is mismatched. | 400 | 签名不匹配 | 检查签名计算过程是否正确 |
RequestTimeTooSkewed | The difference between the request time and the server's time is too large. | 403 | 客户端时间与服务器时间相差过多 | 校正客户端时间并重新计算签名 |
OverRateLimit | Over rate limit. | 429 | 超过流控限制 | 请求超过客户端QPS限制,请等待一段时间后重试 |
BadGateway | No available backend. | 502 | 无可用后端 | 请求超过后端QPS限制,或后端为不可用状态,请等待一段时间后重试 |
BadGateway | Failed to call backend. | 502 | 后端未按预期返回响应 | 检查后端是否正常工作,或联系技术支持 |
GatewayTimeout | Backend timeout. | 504 | 请求后端超时 | 检查后端是否正常工作,或联系技术支持 |
API网关元数据管理错误码
错误码 | 错误信息 | HTTP状态码 | 含义 | 解决办法 |
---|---|---|---|---|
TooManyApis | You have attempted to create more APIs than allowed. | 400 | 单一分组内API个数超过上限 | 可以通过提工单申请提高上限 |
InvalidApiName | The api name is invalid. | 400 | API名称不合法 | 修改API名字 |
InvalidApiDescription | The api description is invalid. | 400 | API描述不合法 | 修改API描述 |
InvalidApiVisibility | The api visibility is invalid. | 400 | API可见度不合法 | 修改API可见度配置 |
InvalidApiAuthType | The api auth type is invalid. | 400 | API认证类别不合法 | 修改API鉴权配置 |
InvalidResultType | The result type is invalid. | 400 | API结果类别不合法 | 修改API返回结果ContentType |
InvalidErrorCodeSample | The error code sample is invalid. | 400 | API异常码不合法。可能抛错的参数有: 1. Code不合法; 2. Message,不合法; 3. Description,不合法 |
修改异常码示例 |
InvalidApiRequestConfig | The api request config is invalid. | 400 | API请求接收配置不合法。可能抛错的参数有: 1. requestProtocol,取值不在给定范围内; 2. requestHttpMethod,取值不在给定范围内; 3. requestPath,不合法; 4. header/query/body Mode,取值不在给定范围内; 5. bodyFormat,取值不在给定范围内 |
修改API的请求配置 |
InvalidApiServiceConfig | The api service config is invalid. | 400 | API请求转发配置不合法。可能抛错的参数有: 1.serviceType,取值不在给定范围内; 2.httpConfig,address地址不可用,httpPath不合法,method取值不在给定范围内,contentTypeCategory取值不在给定范围内; 3.超时时间配置不合法 |
修改后端服务配置 |
InvalidRequestParameter | The request parameter is invalid. | 400 | API请求接收参数(入参)不合法 | 修改请求参数 |
InvalidServiceParameter | The service parameter is invalid. | 400 | API请求转发参数(后端参数)不合法 | 修改后端参数 |
InvalidParameterMap | The parameter map is invalid. | 400 | API参数映射不合法 | 修改参数映射 |
InvalidPageParameter | The page size should between 1 and 100, page number should bigger than 0. The max keys should between 1 and 100. |
400 | 分页参数不合法 | 修改分页参数 |
InvalidDeployDescription | The deploy description is invalid. | 400 | 当前发布的描述不合法 | 修改API的发布描述 |
ApiCanNotDeployed | The Api can not deploy. | 400 | 1.API定义中的环境变量未找到取值 2.API定义中的host是内网API |
检查API配置 |
ApiNotDeployed | The api is not deployed to given stage. | 400 | API没有部署到给定的环境 | 检查下线的API配置 |
TooManyApps | You have attempted to create more apps than allowed. | 400 | 当前用户APP数量超过上限 | 可以通过提工单申请提高上限 |
AppAlreadyExists | The app name is already exist. | 400 | APP名称在当前用户已存在 | 修改APP名字 |
ParameterMissing | 详细信息有多种,在此不详细罗列 | 400 | 通用参数缺失异常 | 根据错误信息进行参数补充 |
InvalidAppName | The app name is invalid. | 400 | APP名称不合法 | 修改APP名称 |
InvalidAppDescription | The app description is invalid. | 400 | APP描述不合法 | 修改APP描述 |
InvalidAppId | The app id is invalid. | 400 | APP ID 不合法 | 检查APP ID |
InvalidExpireTime | The expire time is invalid. | 400 | 过期时间格式错误 | 修改时间格式 |
InvalidIpControlName | The ip control name is invalid. | 400 | IP访问控制名称不合法 | 检查IP访问控制配置 |
InvalidIpControlDescription | The ip control description is invalid. | 400 | IP访问控制描述不合法 | 检查IP访问控制配置 |
InvalidIpControlType | The ip control type is invalid. | 400 | IP访问控制类型错误 | 检查IP访问控制配置 |
TooManyIps | You have attempted to bind more ips than allowed. | 400 | 当前绑定IP数量超过上限 | 可以通过提工单申请提高上限 |
PolicyIpDuplication | The IPs in policy are duplicated | 400 | 策略中IP重复 | 检查配置 |
TooManyGroups | You have attempted to create more groups than allowed. | 400 | 当前用户在当前区域API分组数量超过上限 | 可以通过提工单申请提高上限 |
TooManyPolicies | You have attempted to bind more policies than allowed. | 400 | 当前绑定策略数量超过上限 | 可以通过提工单申请提高上限 |
InvalidGroupName | The group name is invalid. | 400 | API分组的名称不合法 | 修改配置 |
InvalidGroupDescription | The group description is invalid. | 400 | API分组的描述不合法 | 检查API分组的描述 |
InvalidVariableKey | Variable key is invalid. | 400 | 新建变量的key不合法 | 修改环境变量配置 |
InvalidVariableValue | Variable value is invalid. | 400 | 新建变量的value不合法 | 修改环境变量配置 |
InvalidDomain | Custom domain is invalid. | 400 | 域名格式错误 | 检查自定义域名 |
UnRecordDomain | Domain has no icp record. | 400 | 当前域名未备案 | 检查自定义域名 |
UnCnameDomain | Domain not cname to group. | 400 | 域名未解析至当前API分组 | 检查自定义域名 |
InvalidDomainInCertificate | The domain is not valid in certificate. | 400 | 当前域名不在证书有效范围内 | 检查域名的证书验证 |
TooManyGroupDomains | You have attempted to bind more group domains than allowed. | 400 | 单个分组绑定域名超出上限 | 可以通过提工单申请提高上限 |
NoSuchDomain | The domain is deleted or not exist. | 400 | 当前域名不存在 | 请检查域名配置 |
InvalidModelName | The model name is invalid. | 400 | model名称不合法 | 请检查model名称规范 |
InvalidModelDescription | Model description is invalid. | 400 | model描述不合法 | 请检查model描述规范 |
InvalidModelDefinition | The model definition is invalid. | 400 | model定义不合法 | 请检查model定义规范 |
InvalidVpcTemplateName | Vpc template name is invalid. | 400 | VPC模板名字格式不合法 | 请检查VPC模板名字规范 |
VpcTemplateNameAlreadyExists | Vpc template name already exists. | 400 | VPC模板名字已存在 | 请更换VPC模板名字 |
InvalidRegion | The region is invalid or not supported. | 400 | 地区取值非法 | 请检查地区信息 |
InvalidVpcId | The vpc id does not exist in given region. | 400 | VPC ID非法(不存在、不属于当前账户、不在指定地区) | 请检查VPC ID |
InvalidVpcIp | The vpc ip is invalid. | 400 | IP取值不合法 | 请检查VPC IP规范 |
InvalidVpcPort | The vpc port is invalid. | 400 | port取值不合法 | 请检查VPC port规范 |
TooManyVpcTemplate | You are trying to create vpc template more than allowed. | 400 | 创建的模板已达到限额 | 可以通过提工单增加上限 |
TooManyBackendKeys | You have created backend keys up to limit. | 400 | 后端密钥数量超过限制 | 可以通过提工单增加上限 |
InvalidBackendKeyName | Backend key name is invalid. | 400 | 后端密钥名字不合法 | 请检查后端密钥名字规范 |
InvalidBackendKeyDescription | Backend key description is invalid. | 400 | 后端密钥描述不合法 | 请检查后端密钥描述规范 |
InvalidBackendKeySignatureKey | Backend key signatureKey is invalid. | 400 | 后端密钥key不合法 | 请检查后端密钥key规范 |
BackendKeyInUse | Backend key can not be deleted because it is still in use. | 400 | 后端密钥使用中,不能删除 | 请检查后端密钥secret规范 |
NoApiWhenBinding | No Api When Binding Backend Key. | 400 | 绑定API时,API列表为空 | 检查绑定的API列表 |
ApiImportException | Swagger ymal can't be parsed. Content to import can't be parsed. |
400 | 导入的内容无法被转换 | 检查导入的内容 |
ApiImportException | Miss swagger backend service required param | 400 | 进行API导入时后端服务参数设置异常 | 检查API的后端服务配置 |
ApiImportException | Swagger backend param property is miss. | 400 | 配置常量参数或系统参数时属性缺失 | 检查API的常量参数或系统参数配置 |
ApiImportException | Swagger parameter <message> is wrong. |
400 | 参数类型转换时,因为配置错误导致转换错误 | 根据提示检查API配置 |
ApiImportException | There is no apis to import. | 400 | 导入数据中没有API时抛出 | 请在导入时配置API |
InvalidBackendKeySignatureSecret | Backend key signatureSecret is invalid. | 400 | 后端密钥secret不合法 | 请检查后端密钥secret规范 |
AppOperationDenied | No permission to operate the app. | 403 | 目标APP操作拒绝 | 检查要修改的APP |
AppInconsistent | The app key and app id are inconsistent. | 404 | APP ID与APP key不一致 | 检查APP |
NoSuchApi | The api is deleted or not exist. | 404 | 目标API不存在 | 没有这个API,不能进行修改 |
NoSuchStage | The stage is deleted or not exist. | 404 | 目标环境不存在 | 修改API发布环境 |
NoSuchHistory | The history is not exist. | 404 | 目标历史记录不存在 | 检查API版本配置 |
NoSuchApi | The api is deleted or not exist. | 404 | 当前API不存在 | 检查要修改或者删除的API |
NoSuchApp | The app is deleted or not exist. | 404 | 目标APP不存在 | 检查要修改的APP |
NoSuchIpControl | The ip control is deleted or not exist. | 404 | IP访问控制不存在 | 检查修改配置 |
NoSuchPolicy | The policy is deleted or not exist. | 404 | 目标IP访问控制策略不存在 | 检查配置 |
NoSuchIpControl | The ip control is deleted or not exist. | 404 | IP访问控制不存在 | 检查配置 |
AlreadyBoundIpControl | The binding of the api with this stage tag has bound. | 404 | 该环境下API已经绑定 | 检查配置 |
NoSuchGroup | The group is deleted or not exist. | 404 | 目标API分组不存在. | 检查分组配置 |
NoSuchVariable | The variable is deleted or not exist. | 404 | 目标环境变量不存在 | 检查配置 |
NoSuchCertificate | The certificate is deleted or not exist. | 404 | 当前证书不存在 | 请检查证书信息 |
NoSuchVpcTemplate | There is no such vpc template. | 404 | 查询的模板不存在 | 请检查VPC模板信息 |
NoSuchBackendKey | No such backend key. | 404 | 该后端密钥不存在或不存在该账户下 | 请检查后端密钥信息 |
ApiInUse | The api has been deployed and still in use. | 409 | 目标API已经被发布,并正在使用 | 现将API下线,然后删除 |
IpControlNotEmpty | The ip control you tried to delete is not empty. | 409 | IP访问控制中有绑定API,拒绝删除 | 现将API解绑,然后删除IP访问控制 |
OperationNotSupport | The type of refuse is not allowed to bind appId. | 409 | 当前IP访问策略类型不支持设置APP | 请检查访问控制策略配置 |
PolicyAlreadyExists | The policy with this app id is already exist. | 409 | 当前APP ID策略已存在 | 检查策略中APP配置 |
ApiAlreadyExists | 1.The requested API name is already exist in the group. 2.The requested API request line(method+path+required query parameter) is already existed in the group. |
409 | 1.API的名称在当前用户请求分组内已存在 2.API 配置重复 |
可以提工单,增加API数量上线 |
GroupAlreadyExists | The requested group name is already existed | 409 | API分组的名称在当前用户请求区域内已存在 | 修改分组配置 |
GroupNotEmpty | The group you tried to delete is not empty. | 409 | 目标API分组中含有API,拒绝删除 | 请将分组的API删除后再删除分组 |
VariableAlreadyExists | The requested variable key is already existed in the stage. | 409 | 新建变量已存在 | 变更环境变量配置 |
GroupDomainAlreadyExists | The domain is already binding on this group. Please select a different domain and try again. | 409 | 域名在当前分组内已存在 | 检查自定义域名 |
ModelAlreadyExists | The model name already exists. | 409 | Model名称已存在 | 请检查model名字配置 |
BackendKeyNameAlreadyExists | Backend key name already exists. | 409 | 后端密钥名字重复 | 请检查后端密钥名字配置 |
BatchOperationLimitExceeded | The api id in traffic policy binding is exceed limit. | 413 | 绑定数量超过限制 | 将批量绑定的数量降低 |
<message>
表示具体的异常信息,与实际抛出异常信息相对应。