near-api-js
near-api-js copied to clipboard
Exceeding gas doesn't show correct error
Calling any transaction with too much attached gas leads to unclear error:
near call testnet create_account '' --gas 1000000000000000000 --accountId illia
Leads to error Error submitting heartbeat: InvalidTxError: {}
while error from RPC has all the details:
{“jsonrpc”:“2.0",“error”:{“code”:-32000,“message”:“Server error”,“data”:{“TxExecutionError”:{“InvalidTxError”:{“ActionsValidation”:{“TotalPrepaidGasExceeded”:{“total_prepaid_gas”:1000000000000000000,“limit”:300000000000000}}}}}},“id”:126}
Downgrading to P2 since it's not near-api-js
issue.
Further actions:
- wait for https://github.com/near/nearcore/issues/4025 to be fixed
- add an error message for
TotalPrepaidGasExceeded
innear-api-js
(if needed) - test and close this issue
https://github.com/near/near-api-js/issues/321 was a duplicate of this issue. Check comments about preventing call on near-api-js
side.
Issue no longer exists in current release:
Error: {"kind":{"ActionsValidation":{"TotalPrepaidGasExceeded":{"limit":300000000000000,"total_prepaid_gas":1000000000000000000}}}}
at parseRpcError (https://xdskw.csb.app/node_modules/near-api-js/lib/utils/rpc_errors.js:24:19)
at JsonRpcProvider.eval (https://xdskw.csb.app/node_modules/near-api-js/lib/providers/json-rpc-provider.js:355:66)
at [Generator.next](http://generator.next/) (<anonymous>)
at fulfilled (https://xdskw.csb.app/node_modules/near-api-js/lib/providers/json-rpc-provider.js:5:58)