You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really nice if we could pattern match on returned dispatch errors. E.g. something like
match error {
SubxtRuntimeError::Module(MyModule::MyError) => {...}
_ => ...,
}
Currently we have to manually check the PalletError.pallet and PalletError.error strings, and these string constants are not exposed in the generated code.
The text was updated successfully, but these errors were encountered:
I'll close this since a fix for this is proposed in #734 now :)
One won't be able to immediately pattern match, since the errors are generated via static codegen (which is optional), but an .as_root_error<runtime::Error>() will be provided to attempt to decode some ModuleError into a "pretty" static type.
It would be really nice if we could pattern match on returned dispatch errors. E.g. something like
Currently we have to manually check the
PalletError.pallet
andPalletError.error
strings, and these string constants are not exposed in the generated code.The text was updated successfully, but these errors were encountered: