Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

JSON-RPC SendTransaction's error message is not informative #785

Closed
yihuang opened this issue Nov 26, 2021 · 0 comments · Fixed by #786
Closed

JSON-RPC SendTransaction's error message is not informative #785

yihuang opened this issue Nov 26, 2021 · 0 comments · Fixed by #786

Comments

@yihuang
Copy link
Contributor

yihuang commented Nov 26, 2021

System info: ethermint main

Steps to reproduce:

  1. Run devnet
  2. Try to send invalid tx
  3. the returned error message is not informative

Expected behavior: error message should explain what's wrong

Actual behavior:

  • wrong nonce: "internal"
  • can't pay fee: "internal"
  • already in mempool: ""

Additional info:

Solution:

  1. use ABCIError to convert known error codes.
  2. ante handler don't use stacktrace.Propagate to wrap known sdkerrors.
yihuang added a commit to yihuang/ethermint that referenced this issue Nov 26, 2021
Closes: evmos#785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages
yihuang added a commit to yihuang/ethermint that referenced this issue Nov 26, 2021
Closes: evmos#785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages
fedekunze added a commit that referenced this issue Nov 26, 2021
* fix error message in `SendTransaction` json-rpc api

Closes: #785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages

* Update x/evm/keeper/msg_server.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
mergify bot pushed a commit that referenced this issue Nov 26, 2021
* fix error message in `SendTransaction` json-rpc api

Closes: #785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages

* Update x/evm/keeper/msg_server.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
(cherry picked from commit c8d4d3f)

# Conflicts:
#	CHANGELOG.md
mergify bot pushed a commit that referenced this issue Nov 26, 2021
* fix error message in `SendTransaction` json-rpc api

Closes: #785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages

* Update x/evm/keeper/msg_server.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
(cherry picked from commit c8d4d3f)

# Conflicts:
#	CHANGELOG.md
#	app/ante/eth.go
#	go.mod
#	rpc/ethereum/namespaces/eth/api.go
#	x/evm/keeper/keeper.go
#	x/evm/keeper/state_transition.go
yihuang added a commit to crypto-org-chain/ethermint that referenced this issue Nov 29, 2021
Closes: evmos#785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages
leejw51crypto pushed a commit to leejw51crypto/ethermint that referenced this issue Nov 30, 2021
* fix error message in `SendTransaction` json-rpc api

Closes: evmos#785

Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server

changelog

fix error messages

* Update x/evm/keeper/msg_server.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant