最近更新时间:2021-06-22
若请求错误,服务器将返回的JSON文本包含以下参数:
字段 | 类型 | 说明 |
---|---|---|
code | int | 错误码 |
message | string | 错误信息 |
description | string | 错误信息的说明 |
例如Token失效返回:
{ "fault": { "code": 900901, "message": "Invalid Credentials", "description": "Access failure for API: /api/ocr/idcard/1.0.0, version: 1.0.0 status: (900901) - Invalid Credentials. Make sure you have given the correct access token" } }
{ "fault": { "code": 900901, "message": "Invalid Credentials", "description": "Access failure for API: /api/ocr/idcard/1.0.0, version: 1.0.0 status: (900901) - Invalid Credentials. Make sure you have given the correct access token" } }
{ "fault": { "code": 900901, "message": "Invalid Credentials", "description": "Access failure for API: /api/ocr/idcard/1.0.0, version: 1.0.0 status: (900901) - Invalid Credentials. Make sure you have given the correct access token" } }
需要重新获取新的Access Token,再次请求获取Token的API即可。
错误码 | httpsCode | 含义 | 说明 |
---|---|---|---|
900901 | 401 | Invalid credentials | 提供的token无效 |
900902 | 401 | Missing credentials | 没有提供token |
900905 | 401 | Incorrect access token type is provided | 不支持的token类型 |
900906 | 403 | No matching resource found in the API for the given request | 访问的服务不存在,请检查访问路径 |
900907 | 401 | The requested API is temporarily blocked | 调用的接口维护中,暂时不可用 |
900908 | 403 | Resource forbidden | 禁止访问,请确保你调用的服务已经订阅 |
900909 | 401 | The subscription to the API is inactive | 调用的接口维护中,暂时不可用 |
900910 | 403 | The access token does not allow you to access the requested resource | 禁止访问,请确保你调用的服务已经订阅 |
10011 | 403 | available pkg use up | 服务的套餐已用完,暂时无法使用,购买套餐即可 |
10021 | 403 | request throttled out | 并发限制,稍后重试即可 |