FM-029 Asynchronous Operations and Infrastructure

Bulk API Partial-Success Failures

Mixed success/failure batches without per-item error reporting, causing consumers to retry already-successful items.

Failure explanation

A batch endpoint processes some items but rejects others, while the response does not clearly correlate each result with its input. Consumers may assume the whole batch succeeded because the HTTP request returned 2xx, or retry all items and repeat successful side effects. The API must define whether the batch is atomic or independently processed and how item-level errors are represented.

Example

A batch of 100 employee updates contains 95 valid records and 5 invalid department IDs. The API returns HTTP 200 with {"successCount":95,"failureCount":5} but no item identifiers or error details. The client cannot determine which five records need correction.

How to test

  • Test all-success, all-failure, and mixed batches.
  • Verify one correlated result per input item.
  • Test duplicate items, invalid records, batch-size boundaries, and retries.
  • Confirm whether processing is atomic or per-item.

Expected behavior

The response unambiguously reports each item’s outcome and retryability, enabling safe retries of failed items without repeating successful operations.

Runnable examples

Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.