Skip to content

Commit 694445b

Browse files
committed
feat(api): enhance estimateGas error handling to include data field
1 parent af80922 commit 694445b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,12 @@ public String estimateGas(CallArguments args) throws JsonRpcInvalidRequestExcept
648648
errMsg += ": " + msg;
649649
}
650650

651-
throw new JsonRpcInternalException(errMsg);
651+
if (data.length > 0) {
652+
throw new JsonRpcInternalException(errMsg, ByteArray.toJsonHex(data));
653+
} else {
654+
throw new JsonRpcInternalException(errMsg);
655+
}
656+
652657
} else {
653658

654659
if (supportEstimateEnergy) {

0 commit comments

Comments
 (0)