<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKError/Code/batchRequestFailed",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:@E@CKErrorCode@CKErrorBatchRequestFailed"
  },
  "title" : "CKError.Code.batchRequestFailed"
}
-->

# CKError.Code.batchRequestFailed

An error that occurs when the system rejects the entire batch of changes.

```
case batchRequestFailed
```

## Discussion

This error occurs when an operation attempts to save multiple items in a custom zone, but one of those items encounters an error. Because custom zones are atomic, the entire batch fails. The items that cause the problem have their own errors, and all other items in the batch have a [`CKError.Code.batchRequestFailed`](/documentation/CloudKit/CKError/Code/batchRequestFailed) error to indicate that the system can’t save them.

This error indicates that the system can’t process the associated item due to an error in another item in the operation. Check the other per-item errors under [`CKPartialErrorsByItemIDKey`](/documentation/CloudKit/CKPartialErrorsByItemIDKey) for any that aren’t [`CKError.Code.batchRequestFailed`](/documentation/CloudKit/CKError/Code/batchRequestFailed) errors. Handle those errors, and then retry all items in the operation.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)