I have no idea now to use errors that papi generates...
It's mentioned in codegen part
but not alongside other generated APIs, like constants
I see you can import the type, like this:
import { WestendErrors } from "@polkadot-api/descriptors";
// and probably do something like
const error: WestendErrors["Preimage"]["NotNoted"] = undefined;
But how do you actually get instances of these errors and match them in runtime?
I have no idea now to use errors that papi generates...
It's mentioned in codegen part but not alongside other generated APIs, like constants
I see you can import the type, like this:
But how do you actually get instances of these errors and match them in runtime?