ItemFailed
Event v120 → current #4Emitted for each call in a batch that failed.
View events on chainUseful 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
| # | Name | Type | Description |
|---|---|---|---|
| 0 | error | DispatchError | Error from the failed call |
Code Examples
import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";
const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });
// Subscribe to ItemFailed events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("Utility") &&
event.method === "ItemFailed"
)
.forEach(({ event }) => {
console.log("ItemFailed:", event.data.toHuman());
});
});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
- v393