-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed error messages being wrapped in strings when using ganache or h… #15205
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
c4e9616
to
953e081
Compare
…ardhat Move crazy substring to be inside the trycatch
953e081
to
cf41946
Compare
e35c57c
to
7d57d06
Compare
Builds ready [7d57d06]Page Load Metrics (1710 ± 52 ms)
|
Having just today written even more code that parses out nested-in-string errors (lacking any other way to get the information) I am not a fan of the idea of just breaking this suddenly....there is a lot of DApp code with workarounds for this longstanding issue that will probably break. |
@wbt understandable and agreed. Closing this PR since the plan has changed:
In doing so, users who haven't yet written the code to parse out the underyling error will at least have the We should leave it like this until we have a well-defined process for incurring 'breaking for the better' changes (thx for the comment @wbt). There are some other fixes that have been held back for the same reason, so it's becoming a greater and greater priority to stamp out a process around the lifecycle of a breaking change to metamask public api. Developers should be given incrementally louder signals about upcoming changes so that they have a predictable and ample amount of time to update their code. We want to make sure we get that part right :) |
Note: Developers might have code that is similarily parsing out the underlying error in a similar way. This PR improves the returned errors, and breaks peoples code for handling the nested-in-a-string errors.
This was the only place I could find inside of extension that is handling errors that are returned in-band when calling sendtransactionRaw to ganache or harthat.
Fixes #12646
Before:
After:
Before:
After: