getRegistryError

Return a RegistryError if a result errored in one of many Substrate pallets, or undefined if not.

Basic Usage

See dispatchError code implementation.

import { call, getRegistryError } from 'useink/core';

const result = await call(contract, ...additionalArgs);

if (!result.ok) {
  const registryError = getRegistryError(result, { contract });
}

Return Type

interface RegistryError {
    args: string[];
    docs: string[];
    index: number;
    method: string;
    name: string;
    section: string;
}

Last updated

Was this helpful?