Open wbt opened 2 years ago
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.
This issue was closed because there has been no follow up activity in the last 45 days. If you feel this was closed in error, please reopen and provide evidence on the latest release of the extension. Thank you for your contributions.
I still don't think this should be closed, and don't see any suggestion that the issue was reviewed by the team after the first stale label.
Describe the bug
This is a spin-off issue from https://github.com/tablelandnetwork/js-tableland/issues/83, part 1. More detail can be found there.
In short, when MetaMask gets a 429 response from the JSON-RPC endpoint when it checks on transaction status, it should catch that error and retry after some delay, instead of bubbling up the error to application code for handling as if the transaction failed (e.g. due to user denying transaction signature, EVN revert, etc.). Bubbling this up as an error to code that can't do anything to control the rate of requests, and/or in many cases requiring a user who has even less ability to understand the error or affect the request rate to repeat a transaction (while the original will generally still go through!) leads to pretty bad web3 user experience.
In addition, MetaMask should be throttling its requests appropriately to not hit those 429 errors, but handling that issue should probably be deferred until after verification that it's able to handle the limit error appropriately, because no matter how reasonable a rate MetaMask uses, it might still hit limits (e.g. on an endpoint that aggregates all public requests under one rate limit).
See also #15000.
Steps to reproduce
Error messages or log output
Version
10.17.0
Build type
No response
Browser
Chrome
Operating system
Windows
Hardware wallet
No response
Additional context
Sometimes, this error is bubbled up as a failure, and sometimes it's just logged but the code can continue on - it's not clear what distinguishes the two cases but it's below application-level code.