Skip to content
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

Implement error forwarding #133

Closed
athei opened this issue Nov 1, 2021 · 0 comments · Fixed by #366
Closed

Implement error forwarding #133

athei opened this issue Nov 1, 2021 · 0 comments · Fixed by #366
Assignees
Labels

Comments

@athei
Copy link
Contributor

athei commented Nov 1, 2021

When a mutable message (constructor or otherwise) is dry-run as an RPC the UI should properly decode the returned value and classify it as error or success.

Please note that there are three different layers of failure:

  1. Something failed on the json rpc level. Usually some programming error or totally invalid input. Bug in js or sce probably.
  2. The dispatchable failed: This means that the contract had no chance to return any decodeble data but rather failed without doing so.
  3. The contract execution finished but the flags contain the revert bit (the least significant bit). In this case the output buffer should be decoded and displayed as an error (just as in case 2).

This issue is about the 3. error layer because I assume the first two are already implemented.

Please note that the output buffer should always be decoded and presented to the user. The tricky part is to check for the revert flag to properly indicate that it is an error.

@cmichi

polkadot-js/apps#6465

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants