I am trying to make a call from a rust canister to a non-query method of a motoko canister.
I am getting the following error:
The Replica returned an error: code 5, message: “IC0503: Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped explicitly: Panicked at ‘called Result::unwrap() on an Err value: (DestinationInvalid, “Canister ryjl3-tyaaa-aaaaa-aaaba-cai has no query method ‘getUserDatasetAccess’”)’, src/data_assets/src/main.rs:332:17”
The error seems to suggest that only calls to query methods can be made using ic_cdk::call() (?)
What am I missing here?
I cannot make this method a query one because inside of it I am calling actor class stuff… and inter canister query calls don’t work in motoko, am I getting this right?
Thanks both!
So it appears it was (most likely) an issue with type decoding. Not sure why it got translated into the error message above.
Anyway, I managed to fix the issue by simply using CallResult… which I wasn’t doing before.