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

Unify runtime error types #1881

Closed
svyatonik opened this issue Feb 14, 2023 · 0 comments
Closed

Unify runtime error types #1881

svyatonik opened this issue Feb 14, 2023 · 0 comments
Assignees

Comments

@svyatonik
Copy link
Contributor

svyatonik commented Feb 14, 2023

may be fixed separately or as a part of #2457

We are using pallet-level errors, but there are errors that appear somewhere inside the "glue" runtime code and they are then logged (logs are unavailable for release runtimes) and are then merged into some "big" pallet-level error. E.g. when messages pallet is verifying messages proof, there's a lot of bad stuff that can happen there - e.g. invalid messages range, unknown header, invalid storage root, duplicate items in the storage proof, unused items in the storage proof, ... But in the end the transaction will fail with the InvalidMessagesProof error, which isn't super-informative.

Let's make either bridges-level error enum or pallet-level enums of what can happen during the call and use it (along with frame_support::PalletError - cheers to @serban300 for finding this) instead of &' static str and other custom errors.

@svyatonik svyatonik added this to the When Thou Have Spare Hour milestone Feb 14, 2023
@serban300 serban300 self-assigned this Mar 2, 2023
svyatonik pushed a commit that referenced this issue Jul 17, 2023
* companion for #12599

* update substrate & polkadot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants