ItemFailed

Event v120 → current #4

Emitted for each call in a batch that failed.

View events on chain
Useful for: developersanalytics

The Big Picture

Contains the error from the failed call.

Use Cases

  • Debug individual batch call failures

From Chain Metadata

A single item within a Batch of dispatches has completed with error.

Triggers

Emitted by

Preconditions

  • Part of force_batch
  • This call failed

Effects

Postconditions

  • Failed call had no effect

Event Data

#NameTypeDescription
0
error
DispatchError Error from the failed call

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Subscribe to ItemFailed events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Utility.ItemFailed.get(block.hash);
  for (const evt of events) {
    console.log("ItemFailed:", evt.payload);
  }
});

On-Chain Activity

Emission Frequency
●●●●○○ Significant 1M–5M emissions

Major features with millions of emissions

#22 most emitted event

As of block 7,429,232

Runtime Info

Pallet Index
11
Event Index
4
First Version
v120
Current Version
v411