MetaMask / MetaMask/metamask-extension
[Bug]: Contract revert error messages are too vague
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
**Describe the bug**
When a contract interaction is expected to revert, I would expect the primary action to be disabled and a proper error message (from revert data) to be displayed (for this case "Token ID is taken").

**Steps to reproduce**
Can repro by performing mint(69) on https://etherscan.io/address/0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2#writeContract.
**Version**
Latest
**Build type**
None
**Browser**
Chrome
**Operating system**
MacOS
Contributor guide
Research direction
Reproduce the issue by calling mint(69) on the linked Etherscan contract and observe the current revert handling. Trace the TypeScript code responsible for contract interaction errors and the primary action state; done means the action is disabled on the expected revert and the revert data produces the message "Token ID is taken".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100