Polkadot Apps
    Preparing search index...

    Function extractInvalidKind

    • Extract the inner sub-type from a polkadot-api { type: "Invalid", value: { type: ... } } thrown via signSubmitAndWatch's observable. Returns undefined for any other shape so callers can fall through to generic error handling.

      Parameters

      • err: unknown

      Returns string | undefined

      extractInvalidKind({ type: "Invalid", value: { type: "Stale" } }); // "Stale"
      extractInvalidKind(new Error("Network down")); // undefined