CryptoBlades / cryptoblades

535 stars 258 forks source link

[Feature] - RPC Error Message Update #1929

Open remocwenn opened 1 year ago

remocwenn commented 1 year ago

Prerequisites

Describe the feature and its requirements

There is an error message "Error: Internal JSON-RPC error. {"code". -32005, "message": "limit exceeded"}" that has been frequented on BNB chain. It can sometimes be alleviated by the user switching to a different rpc. This change in the error message is in effort to inform the user facing this issue of this possible solution.

The change in text is to add the following line "- Consider changing your rpc" below the error message

image

Is your feature request related to an existing issue? Please describe.

https://github.com/CryptoBlades/cryptoblades/issues/1855

https://github.com/CryptoBlades/cryptoblades/issues/1753

Is there anything stopping this feature being completed?

N/A

Describe alternatives you've considered

N/A

Additional context

While this is most common on BNB chain, this update to the error message should be updated on all chains.

YimitKEQ commented 1 year ago

I have some proposed messages as well; these can be added to make it more clear for the user and keep it a bit more friendly and understanding;

  1. Attention! You've encountered an internal JSON-RPC error with the code -32005. To resolve this issue, please change your RPC in MetaMask.
  2. We've detected an internal JSON-RPC error with the code -32005. This error can be resolved by changing your RPC in MetaMask.
  3. Attention! You've hit an internal JSON-RPC error with the code -32005. No need to worry, though. This error can be resolved by changing your RPC in MetaMask.
  4. Uh-oh! You've encountered an internal JSON-RPC error with the code -32005. To fix this issue, please change your RPC in MetaMask.
  5. Oops! Looks like you've encountered an internal JSON-RPC error with the code -32005. This error can be resolved by changing your RPC in MetaMask.