BatchCompletedWithErrors

Event v120 → current #2

Emitted when a batch completed but some calls failed.

View events on chain
Useful for: developersanalyticswallets

The Big Picture

force_batch continues on failure. Check ItemFailed events for details.

Use Cases

  • Monitor partial batch success

From Chain Metadata

Batch of dispatches completed but has errors.

Triggers

Emitted by

Preconditions

  • force_batch call executed
  • At least one call failed

Effects

Postconditions

  • Successful calls persisted

Side Effects

  • Check ItemFailed for details

This event has no data fields.

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 BatchCompletedWithErrors events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Utility.BatchCompletedWithErrors.get(block.hash);
  for (const evt of events) {
    console.log("BatchCompletedWithErrors:", evt.payload);
  }
});

On-Chain Activity

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

Major features with millions of emissions

#24 most emitted event

As of block 7,429,232

Runtime Info

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