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

Better rpc error response #247

Closed
yihuang opened this issue Jul 9, 2021 · 1 comment · Fixed by #350
Closed

Better rpc error response #247

yihuang opened this issue Jul 9, 2021 · 1 comment · Fixed by #350
Assignees

Comments

@yihuang
Copy link
Contributor

yihuang commented Jul 9, 2021

Proposal: Improve rpc error response like geth

Current behavior: The detailed error reason is included in message

Desired behavior: Separate error message and error data

Use case: Better UX in web3 tools.

https://github.com/ethereum/go-ethereum/blob/master/internal/ethapi/api.go#L940

good:

{
 <           "error": "revert",
 <           "program_counter": 336,
 <           "return": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001054686973206d7573742052455645525400000000000000000000000000000000",
 <           "reason": "This must REVERT"
 <         }

bad:

{
 <       "code": -32000,
 <       "message": "This must REVERT: 0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001054686973206d7573742052455645525400000000000000000000000000000000: execution reverted"
 <     }
@leejw51crypto leejw51crypto self-assigned this Jul 9, 2021
@thomas-nguy
Copy link
Contributor

linked to #314

@thomas-nguy thomas-nguy self-assigned this Jul 19, 2021
@thomas-nguy thomas-nguy mentioned this issue Jul 26, 2021
11 tasks
mmsqe referenced this issue in mmsqe/ethermint May 18, 2023
…kport: evmos#1773)  (#247)

* fix leveldb

for more info, syndtr/goleveldb@afa5311

* avoid channel get changed when concurrent subscribe happens

* add test

* add change doc

* update tm-db

* fix err msg due to empty version check fix

for more info, see https://github.com/cosmos/cosmos-sdk/pull/13355/files
mmsqe referenced this issue in mmsqe/ethermint Jun 14, 2023
…kport: evmos#1773)  (#247)

* fix leveldb

for more info, syndtr/goleveldb@afa5311

* avoid channel get changed when concurrent subscribe happens

* add test

* add change doc

* update tm-db

* fix err msg due to empty version check fix

for more info, see https://github.com/cosmos/cosmos-sdk/pull/13355/files
mmsqe referenced this issue in mmsqe/ethermint Jun 14, 2023
…kport: evmos#1773) (evmos#274)

* fix: avoid channel get changed when concurrent subscribe happens (backport: evmos#1773)  (#247)

* fix leveldb

for more info, syndtr/goleveldb@afa5311

* avoid channel get changed when concurrent subscribe happens

* add test

* add change doc

* update tm-db

* fix err msg due to empty version check fix

for more info, see https://github.com/cosmos/cosmos-sdk/pull/13355/files

* fix test
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.

3 participants