BatchInterrupted
Event v120 → current #0Emitted when a batch did not complete fully - gives index of first failing call .
View events on chainUseful for: developersanalyticswallets
The Big Picture
When batching multiple calls, this event tells you where things went wrong.
Use Cases
- Debug which call in a batch failed
From Chain Metadata
Batch of dispatches did not complete fully. Index of first failing dispatch given, as well as the error.
Triggers
Effects
Postconditions
- Calls up to (but not including) index executed
Side Effects
- Contains error details for debugging
Event Data
| # | Name | Type | Description |
|---|---|---|---|
| 0 | index | u32 | Index of the first failing call in the batch |
| 1 | error | DispatchError | Error that caused the batch to be interrupted |
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 BatchInterrupted events
api.query.system.events((events) => {
events
.filter(({ event }) =>
event.section === stringCamelCase("Utility") &&
event.method === "BatchInterrupted"
)
.forEach(({ event }) => {
console.log("BatchInterrupted:", event.data.toHuman());
});
});On-Chain Activity
Emission Frequency
●●●○○○ Active 100K–1M emissions
Regular feature-level activity
#40 most emitted event
As of block 7,429,232
Runtime Info
- Pallet Index
- 11
- Event Index
- 0
- First Version
- v120
- Current Version
- v393