Skip to content

Commit d432b5d

Browse files
authored
Merge pull request #4695 from tronprotocol/feature/graph_jsonrpc
feat: return err code 32602 when param is not valid
2 parents 6419a2b + 0db37bf commit d432b5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

framework/src/main/java/org/tron/core/services/jsonrpc/TronJsonRpcImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ public String getCall(CallArguments transactionCall, Object blockParamObj)
732732
try {
733733
blockNumOrTag = paramMap.get("blockNumber");
734734
} catch (ClassCastException e) {
735-
throw new JsonRpcInvalidRequestException(JSON_ERROR);
735+
throw new JsonRpcInvalidParamsException(JSON_ERROR);
736736
}
737737

738738
long blockNumber;
@@ -750,7 +750,7 @@ public String getCall(CallArguments transactionCall, Object blockParamObj)
750750
try {
751751
blockNumOrTag = paramMap.get("blockHash");
752752
} catch (ClassCastException e) {
753-
throw new JsonRpcInvalidRequestException(JSON_ERROR);
753+
throw new JsonRpcInvalidParamsException(JSON_ERROR);
754754
}
755755

756756
if (getBlockByJsonHash(blockNumOrTag) == null) {

0 commit comments

Comments
 (0)