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

Not possible to assert pallet's Error variant #59

Open
muharem opened this issue Oct 10, 2022 · 2 comments
Open

Not possible to assert pallet's Error variant #59

muharem opened this issue Oct 10, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@muharem
Copy link
Contributor

muharem commented Oct 10, 2022

On extrinsic fail, its not possible to assert pallet's error varian.

In the example below, its not possible to assert alliance.AllianceNotYetInitialized error variant.
SpRuntimeDispatchError type with full error object can be asserted, which refers to alliance pallet (index 50) and error variant index (error 0x00000000).

Example:
Screenshot 2022-10-10 at 12 57 22

@muharem muharem added the enhancement New feature or request label Oct 10, 2022
@NachoPal
Copy link
Contributor

The reason why those values can not be asserted is because type and details attributes are actually not part of the Event. Those are added in the UI from the metadata.

It has a difficult fitting in the tool.

@NachoPal
Copy link
Contributor

Maybe there is a way: https://substrate.stackexchange.com/a/956/527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants