Panic with subinvoke error fails because of parse error
Currently, in most cases, it is not possible to panic inside of a wasm wrapper with the error you get from a subinvocation. This is most likely due to the way WrapError is de/serialized and lack of support for error aggregation. Example wasm wrapper code:
let result = TestModule.doWithError();
if let Err(err) = result {
panic!("{}", err);
}
Expected result:
Should throw with the error from subinvoke.
Actual result:
The following error is received: Error: Failed to parse WrapError.
I'm unable to replicate the issue with this:
let result = ImportedInvokeModule::invoke_throw_error(
&imported::imported_invoke_module::ArgsInvokeThrowError { a: args.a },
);
if let Err(err) = result {
panic!("{}", err);
}
Do your remember any more details about when the failure occurred?
Added context: Should try to reproduce using ENS text record resolver wrapper by subinvoking to Ethereum wrapper for a text record that does not exist
The issue seems to happen in other URI Resolver extension wrappers as well