Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Propagate require() reasons to the DApp #567

Open
cuongdo opened this issue Sep 27, 2018 · 1 comment
Open

Propagate require() reasons to the DApp #567

cuongdo opened this issue Sep 27, 2018 · 1 comment
Labels

Comments

@cuongdo
Copy link
Contributor

cuongdo commented Sep 27, 2018

When a require() in our contracts fails, they usually have a reason string that propagates to web3. This reason string is visible in our tests. For some reason, the require() is not propagating to to the DApp. Instead, we get a generic and unhelpful JSON-RPC error. This should be fixed to avoid wasting time investigating what should be simple issues.

@cuongdo cuongdo self-assigned this Sep 27, 2018
@cuongdo
Copy link
Contributor Author

cuongdo commented Sep 28, 2018

It doesn't look like this is possible (yet), because MetaMask isn't propagating the reason string:

MetaMask/metamask-extension#4559

I'll see if there's another way, but I'm not too optimistic, because the error object thrown by MetaMask doesn't contain any info except the error code and the generic error message.

@cuongdo cuongdo removed their assignment Oct 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants