错误码描述
RPC 错误码
当一个RPC调用遇到错误时,返回的响应对象必须包含error错误结果字段,该字段有下列成员参数:
- code: 使用数值表示该异常的错误类型,必须为整数。
- message: 对该错误的简单描述字符串。
- data: 包含关于错误附加信息的基本类型或结构化类型,该成员可选。
错误对象包含两类错误码,分别是JSON-RPC标准错误码和FISCO BCOS RPC错误码。
JSON-RPC标准错误码
标准错误码及其对应的含义如下:
code | message | 含义 |
---|---|---|
-32600 | INVALID_JSON_REQUEST | 发送无效的请求对象 |
-32601 | METHOD_NOT_FOUND | 该方法不存在或无效 |
-32602 | INVALID_PARAMS | 无效的方法参数 |
-32603 | INTERNAL_ERROR | 内部调用错误 |
-32604 | PROCEDURE_IS_METHOD | 内部错误,请求未提供id字段 |
-32700 | JSON_PARSE_ERROR | 服务端接收到的json无法解析 |
FISCO BCOS RPC错误码
FISCO BCOS RPC接口错误码及其对应的含义如下:
code | message | 含义 |
---|---|---|
-40001 | GroupID does not exist | GroupID不存在 |
-40002 | Response json parse error | JSON RPC获取的json数据解析错误 |
-40003 | BlockHash does not exist | 区块哈希不存在 |
-40004 | BlockNumber does not exist | 区块高度不存在 |
-40005 | TransactionIndex is out of range | 交易索引越界 |
-40006 | Call needs a ‘from’ field | call接口需要提供from字段 |
-40007 | Only pbft consensus supports the view property | getPbftView接口,只有pbft共识机制有view属性 |
-40008 | Invalid System Config | getSystemConfigByKey接口,查询无效的key |
-40009 | Don’t send requests to this group, the node doesn’t belong to the group | 非群组内节点发起无效的请求 |
-40010 | RPC module initialization is incomplete | RPC模块初始化尚未完成 |
-40011 | Over QPS limit | SDK到节点的请求速率超过节点的请求速率限制 |
交易回执状态
status(十进制/十六进制) | message | 含义 |
---|---|---|
0(0x0) | None | 正常 |
1(0x1) | Unknown | 未知异常 |
2(0x2) | BadRLP | 无效RLP异常 |
3(0x3) | InvalidFormat | 无效格式异常 |
4(0x4) | OutOfGasIntrinsic | 部署的合约长度超过gas限制/调用合约接口参数超过gas限制 |
5(0x5) | InvalidSignature | 无效的签名异常 |
6(0x6) | InvalidNonce | 无效nonce异常 |
7(0x7) | NotEnoughCash | cash不足异常 |
8(0x8) | OutOfGasBase | 调用合约的参数过长 (RC版本) |
9(0x9) | BlockGasLimitReached | GasLimit异常 |
10(0xa) | BadInstruction | 错误指令异常 |
11(0xb) | BadJumpDestination | 错误目的跳转异常 |
12(0xc) | OutOfGas | 合约执行时gas不足 / 部署的合约长度超过最长上限 |
13(0xd) | OutOfStack | 栈溢出异常 |
14(0xe) | StackUnderflow | 栈下限溢位异常 |
15(0xf) | NonceCheckFail | nonce检测失败异常 |
16(0x10) | BlockLimitCheckFail | blocklimit检测失败异常 |
17(0x11) | FilterCheckFail | filter检测失败异常 |
18(0x12) | NoDeployPermission | 非法部署合约异常 |
19(0x13) | NoCallPermission | 非法call合约异常 |
20(0x14) | NoTxPermission | 非法交易异常 |
21(0x15) | PrecompiledError | precompiled错误异常 |
22(0x16) | RevertInstruction | revert指令异常 |
23(0x17) | InvalidZeroSignatureFormat | 无效签名格式异常 |
24(0x18) | AddressAlreadyUsed | 地址占用异常 |
25(0x19) | PermissionDenied | 无权限异常 |
26(0x1a) | CallAddressError | 被调用的合约地址不存在 |
Precompiled Service API 错误码
错误码 | 消息内容 | 备注 |
---|---|---|
0 | success | |
-50000 | permission denied | |
-50001 | table name already exist | |
-50100 | table does not exist | |
-50101 | unknow function call | |
-50102 | address invalid | |
-51000 | table name and address already exist | |
-51001 | table name and address does not exist | |
-51002 | table name overflow | |
-51003 | contract not exist | |
-51004 | committee member permission managed by ChainGovernance | |
-51100 | invalid node ID | SDK错误码 |
-51101 | the last sealer cannot be removed | |
-51102 | the node is not reachable | SDK错误码 |
-51103 | the node is not a group peer | SDK错误码 |
-51104 | the node is already in the sealer list | SDK错误码 |
-51105 | the node is already in the observer list | SDK错误码 |
-51200 | contract name and version already exist | SDK错误码 |
-51201 | version length exceeds the maximum limit | SDK错误码 |
-51300 | invalid configuration entry | |
-51500 | entry parse error | |
-51501 | condition parse error | |
-51502 | condition operation undefined | |
-51600 | invalid ciphers | |
-51700 | group sig failed | |
-51800 | ring sig failed | |
-51900 | contract frozen | |
-51901 | contract available | |
-51902 | CONTRACT_REPEAT_AUTHORIZATIO | |
-51903 | INVALID_CONTRACT_ADDRESS | |
-51904 | TABLE_NOT_EXIST | |
-51905 | NO_AUTHORIZED | |
-52000 | COMMITTEE_MEMBER_EXIST | |
-52001 | COMMITTEE_MEMBER_NOT_EXIST | |
-52002 | INVALID_REQUEST_PERMISSION_DENIED | |
-52003 | INVALID_THRESHOLD | |
-52004 | OPERATOR_CANNOT_BE_COMMITTEE_MEMBER | |
-52005 | COMMITTEE_MEMBER_CANNOT_BE_OPERATOR | |
-52006 | OPERATOR_EXIST | |
-52007 | OPERATOR_NOT_EXIST | |
-52008 | ACCOUNT_NOT_EXIST | |
-52009 | INVALID_ACCOUNT_ADDRESS | |
-52010 | ACCOUNT_ALREADY_AVAILABLE | |
-52011 | ACCOUNT_FROZEN | |
-52012 | CURRENT_VALUE_IS_EXPECTED_VALUE |
动态群组管理 API 状态码
状态码 | 消息内容 | 释义 |
---|---|---|
0x0 | SUCCESS | 接口调用成功 |
0x1 | INTERNAL_ERROR | 节点内部错误 |
0x2 | GROUP_ALREADY_EXISTS | 调用创建群组接口时,群组已存在 |
0x3 | GROUP_ALREADY_RUNNING | 调用启动群组接口时,群组已处于运行状态 |
0x4 | GROUP_ALREADY_STOPPED | 调用停止群组接口时,群组已处于停止状态 |
0x5 | GROUP_ALREADY_DELETED | 调用删除群组接口时,群组已处于删除状态 |
0x6 | GROUP_NOT_FOUND | 调用接口时,对应的群组不存在 |
0x7 | INVALID_PARAMS | 调用接口时,参数不合法 |
0x8 | PEERS_NOT_CONNECTED | 调用创建群组接口时,与sealer间不存在有效的P2P连接 |
0x9 | GENESIS_CONF_ALREADY_EXISTS | 调用创建群组接口时,创世块配置文件已存在 |
0xa | GROUP_CONF_ALREADY_EXIST | 调用创建群组接口时,群组配置文件已存在 |
0xb | GENESIS_CONF_NOT_FOUND | 调用启动群组接口时,未找到创世块配置文件 |
0xc | GROUP_CONF_NOT_FOUND | 调用启动群组接口时,未找到群组配置文件 |
0xd | GROUP_IS_STOPPING | 调用接口时,群组正在释放资源 |
0xf | GROUP_NOT_DELETED | 调用恢复接口时,群组并未被删除 |
当前内容版权归 fisco-bcos.org 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 fisco-bcos.org .