Error code
错误代码说明 :
错误代码原则
统一格式:A-BB-CCC
A:错误级别,如1代表系统级错误,2代表服务级错误;
B:项目或模块名称,一般公司不会超过99个项目;
C:具体错误编号,自增即可,一个项目999种错误应该够用;
错误代码解析
例如,100001错误代码解析如下:
| 服务级错误 | 服务模块代码 | 具体错误代码 |
|---|---|---|
| 1 | 00 | 001 |
错误返回值格式
|
|
错误代码对照表 :
系统级错误代码
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 100001 | System error | 系统错误 |
| 100002 | Service unavailable | 服务暂停 |
| 100003 | Remote service error | 远程服务错误 |
| 100004 | IP limit | IP限制不能请求该资源 |
| 100005 | Permission denied, need a high level appkey | 该资源需要appkey拥有授权 |
| 100006 | Source paramter (appkey) is missing | 缺少source (appkey) 参数 |
| 100007 | Unsupport mediatype (%s) | 不支持的MediaType (%s) |
| 100008 | Param error, see doc for more info | 参数错误,请参考API文档 |
| 100009 | Too many pending tasks, system is busy | 任务过多,系统繁忙 |
| 100010 | Job expired | 任务超时 |
| 100011 | RPC error | RPC错误 |
| 100012 | Illegal request | 非法请求 |
| 100013 | Invalid user | 不合法的用户 |
| 100014 | Insufficient app permissions | 应用的接口访问权限受限 |
| 100016 | Miss required parameter (%s) , see doc for more info | 缺失必选参数 (%s),请参考API文档 |
| 100017 | Parameter (%s)’s value invalid, expect (%s) , but get (%s) , see doc for more info | 参数值非法,需为 (%s),实际为 (%s),请参考API文档 |
| 100018 | Request body length over limit | 请求长度超过限制 |
| 100020 | Request api not found | 接口不存在 |
| 100021 | HTTP method is not suported for this request | 请求的HTTP METHOD不支持,请检查是否选择了正确的POST/GET方式 |
| 100022 | IP requests out of rate limit | IP请求频次超过上限 |
| 100023 | User requests out of rate limit | 用户请求频次超过上限 |
| 100024 | User requests for (%s) out of rate limit | 用户请求特殊接口 (%s) 频次超过上限 |
服务级错误代码
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 200001 | IDs is null | IDs参数为空 |
| 200001 | IDs is null | IDs参数为空 |
| 200002 | Uid parameter is null | Uid参数为空 |
| 200003 | User does not exists | 用户不存在 |
| 200005 | Unsupported image type, only suport JPG, GIF, PNG | 不支持的图片类型,仅仅支持JPG、GIF、PNG |
| 200006 | Image size too large | 图片太大 |
| 200007 | Does multipart has image | 请确保使用multpart上传图片 |
| 200008 | Content is null 内容为空 | |
| 200009 | IDs is too many IDs参数太长了 | |
| 200012 | Text too long, please input text less than 140 characters | 输入文字太长,请确认不超过140个字符 |
| 200013 | Text too long, please input text less than 300 characters | 输入文字太长,请确认不超过300个字符 |
| 200014 | Param is error, please try again | 安全检查参数有误,请再调用一次 |
| 200015 | Account or ip or app is illgal, can not continue | 账号、IP或应用非法,暂时无法完成此操作 |
| 200016 | Out of limit | 发布内容过于频繁 |
| 200017 | Repeat content | 提交相似的信息 |
| 200018 | Contain illegal website | 包含非法网址 |
| 200019 | Repeat conetnt | 提交相同的信息 |
| 200020 | Contain advertising | 包含广告信息 |
| 200021 | Content is illegal | 包含非法内容 |
| 200022 | Your ip’s behave in a comic boisterous or unruly manner | 此IP地址上的行为异常 |
| 200031 | Test and verify | 需要验证码 |
| 200032 | Update success, while server slow now, please wait 1-2 minutes | 发布成功,目前服务器可能会有延迟,请耐心等待1-2分钟 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 201001 | Target weibo does not exist | 不存在的微博 |
| 201002 | Not your own weibo | 不是你发布的微博 |
| 201003 | Can’t repost yourself weibo | 不能转发自己的微博 |
| 201004 | Illegal weibo | 不合法的微博 |
| 201009 | Weibo id is null | 微博ID为空 |
| 201011 | Repeated weibo text | 不能发布相同的微博 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 202001 | Target weibo comment does not exist | 不存在的微博评论 |
| 202001 | Illegal comment | 不合法的评论 |
| 202002 | Not your own comment | 不是你发布的评论 |
| 202004 | Comment id is null | 评论ID为空 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 203001 | Can’t send direct message to user who is not your follower | 不能给不是你粉丝的人发私信 |
| 203002 | Illegal direct message | 不合法的私信 |
| 203003 | Not your own direct message | 不是属于你的私信 |
| 203005 | Direct message does not exist | 不存在的私信 |
| 203006 | Repeated direct message text | 不能发布相同的私信 |
| 203007 | Illegal direct message id | 非法的私信ID |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 204001 | Domain not exist | 域名不存在 |
| 204002 | Wrong verifier | Verifier错误 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 205001 | Source_user or target_user does not exists | 参数source_user或者target_user的用户不存在 |
| 205002 | Please input right target user id or screen_name | 必须输入目标用户id或者screen_name |
| 205003 | Need you follow user_id | 参数user_id必须是你关注的用户 |
| 205004 | Can not follow yourself | 你不能关注自己 |
| 205005 | Social graph updates out of rate limit | 加关注请求超过上限 |
| 205006 | Already followed | 已经关注此用户 |
| 205007 | Verification code is needed | 需要输入验证码 |
| 205008 | According to user privacy settings,you can not do this | 根据对方的设置,你不能进行此操作 |
| 205009 | Private friend count is out of limit | 悄悄关注个数到达上限 |
| 205009 | Not private friend | 不是悄悄关注人 |
| 205011 | Already followed privately | 已经悄悄关注此用户 |
| 205012 | Please delete the user from you blacklist before you follow the user | 你已经把此用户加入黑名单,加关注前请先解除 |
| 205013 | Friend count is out of limit! | 你的关注人数已达上限 |
| 205021 | Hi Superman, you have concerned a lot of people, have a think of how to make other people concern about you! ! If you have any questions, please contact Sina customer service: 400 690 0000 | hi 超人,你今天已经关注很多喽,接下来的时间想想如何让大家都来关注你吧!如有问题,请联系xx客服:400 690 0000 |
| 205022 | Not followed | 还未关注此用户 |
| 205023 | Not followers | 还不是粉丝 |
| 205024 | Hi Superman, you have cancelled concerning a lot of people, have a think of how to make other people concern about you! ! If you have any questions, please contact Sina customer service: 400 690 0000 | hi 超人,你今天已经取消关注很多喽,接下来的时间想想如何让大家都来关注你吧!如有问题,请联系xx客服:400 690 0000 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 206001 | List name too long, please input text less than 10 characters | 列表名太长,请确保输入的文本不超过10个字符 |
| 206002 | List description too long, please input text less than 70 characters | 列表描叙太长,请确保输入的文本不超过70个字符 |
| 206003 | List does not exists | 列表不存在 |
| 206004 | Only the owner has the authority | 不是列表的所属者 |
| 206005 | Illegal list name or list description | 列表名或描叙不合法 |
| 206006 | Object already exists | 记录已存在 |
| 206007 | DB error, please contact the administator | 数据库错误,请联系系统管理员 |
| 206008 | List name duplicate | 列表名冲突 |
| 206010 | Does not support private list | 目前不支持私有分组 |
| 206011 | Create list error | 创建列表失败 |
| 206012 | Only support private list | 目前只支持私有分组 |
| 206013 | You hava subscriber too many lists | 订阅列表达到上限 |
| 206014 | Too many lists, see doc for more info | 创建列表达到上限,请参考API文档 |
| 206015 | Too many members, see doc for more info | 列表成员上限,请参考API文档 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 207001 | Repeated tag text | 不能提交相同的收藏标签 |
| 207002 | Tags is too many | 最多两个收藏标签 |
| 207003 | Illegal tag name | 收藏标签名不合法 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 208001 | Trend_name is null | 参数trend_name是空值 |
| 208002 | Trend_id is null | 参数trend_id是空值 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 209001 | Error: in blacklist | 错误:已经添加了黑名单 |
| 209002 | Error: Blacklist limit has been reached. | 错误:已达到黑名单上限 |
| 209003 | Error: System administrators can not be added to the blacklist. | 错误:不能添加系统管理员为黑名单 |
| 209004 | Error: Can not add yourself to the blacklist. | 错误:不能添加自己为黑名单 |
| 209005 | Error: not in blacklist | 错误:不在黑名单中 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 210001 | Tags parameter is null | 标签参数为空 |
| 210002 | Tags name too long | 标签名太长,请确保每个标签名不超过14个字符 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 211001 | Domain parameter is error | 参数domain错误 |
| 211002 | The phone number has been used | 该手机号已经被使用 |
| 211003 | The account has bean bind phone | 该用户已经绑定手机 |
| 211004 | Wrong verifier | Verifier错误 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 213001 | Auth faild | 认证失败 |
| 213002 | Username or password error | 用户名或密码不正确 |
| 213003 | Username and pwd auth out of rate limit | 用户名密码认证超过请求限制 |
| 213004 | Version rejected | 版本号错误 |
| 213005 | Parameter absent | 缺少必要的参数 |
| 213006 | Parameter rejected | OAuth参数被拒绝 |
| 213007 | Timestamp refused | 时间戳不正确 |
| 213008 | Nonce used | 参数nonce已经被使用 |
| 213009 | Signature method rejected | 签名算法不支持 |
| 213010 | Signature invalid | 签名值不合法 |
| 213011 | Consumer key unknown | 参数consumer_key不存在 |
| 213012 | Consumer key refused | 参数consumer_key不合法 |
| 213013 | Miss consumer key | 参数consumer_key缺失 |
| 213014 | Token used | Token已经被使用 |
| 213015 | Token expired | Token已经过期 |
| 213016 | Token revoked | Token不合法 |
| 213017 | Token rejected | Token不合法 |
| 213018 | Verifier fail | Pin码认证失败 |
| 213019 | Accessor was revoked | 授权关系已经被解除 |
| 213020 | OAuth2 must use https | 使用OAuth2必须使用https |
| 213021 | Applications over the unaudited use restrictions | 未审核的应用使用人数超过限制 |
| 213027 | Expired token | token过期 |
| 213035 | Request uid’s value must be the current user | uid参数仅允许传入当前授权用户uid |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 215001 | Urls is null | 参数urls是空的 |
| 215002 | Urls is too many | 参数urls太多了 |
| 215003 | IP is null | IP是空值 |
| 215004 | Url is null | 参数url是空值 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 216001 | Manage notice error, need auth | 需要系统管理员的权限 |
| 216002 | Contains forbid world | 含有敏感词 |
| 216003 | Applications send notice over the restrictions | 通知发送达到限制 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 217001 | Manage remind error, need auth | 提醒失败,需要权限 |
| 217002 | Invalid category | 无效分类 |
| 217003 | Invalid status | 无效状态码 |
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 219001 | Geo code input error | 地理信息输入错误 |
其它级错误代码(适用于扩展)
| 错误代码 | 错误信息 | 详细描述 |
|---|---|---|
| 3020001 | Other error | 其它错误 |
HTTP’s content-Type
后续补上.
本文有任何错误,或有任何疑问,欢迎留言说明。
邮箱: opensmarty@163.com
QQ: 1327400982
Reference Links
【参考1】: helloworld
【参考2】: Weibo
【参考3】: Taobao
【参考4】: QQ