Open 0xyjk opened 9 months ago
We can do this issue in two stages:
Well, here what we return in this case is the following
$"{Code}, {Message}"
Code is basically nameof(OldNonce)
and message is a descriptive message like so
$"Current nonce: {currentNonce}, nonce of rejected tx: {tx.Nonce}"
Not sure what is the correct approach here. no matter how i try to do it, it will be very custom code for this specific error. or we need to do a completely refactor and rename of enums and our logic of returned errors to comply with a none standardized approach while also losing proper messages explaining exactly what is wrong to the user.
if these projects are using string contains
instead of string match
we can arrange something. to work.
Is your feature request related to a problem? Please describe. currently for nonce too low error, nethermind rpc error message does not contain
nonce too low
string many project use string match to determine the error kind, for example optimism this will cause client side can't catch the correct error kind and will lead to incorrect behaviourDescribe the solution you'd like for compatibility, add extra string in rpc errror message, geth error message can be found here