<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:@E@CKErrorCode"
  },
  "title" : "CKError.Code"
}
-->

# CKError.Code

The error codes that CloudKit returns.

```
enum Code
```

## Topics

### Error Codes

[`case accountTemporarilyUnavailable`](/documentation/CloudKit/CKError/Code/accountTemporarilyUnavailable)

An error that occurs when the user’s iCloud account is temporarily unavailable.

[`case alreadyShared`](/documentation/CloudKit/CKError/Code/alreadyShared)

An error that occurs when CloudKit attempts to share a record with an existing share.

[`case assetFileModified`](/documentation/CloudKit/CKError/Code/assetFileModified)

An error that occurs when the system modifies an asset while saving it.

[`case assetFileNotFound`](/documentation/CloudKit/CKError/Code/assetFileNotFound)

An error that occurs when the system can’t find the specified asset.

[`case assetNotAvailable`](/documentation/CloudKit/CKError/Code/assetNotAvailable)

An error that occurs when the system can’t access the specified asset.

[`case badContainer`](/documentation/CloudKit/CKError/Code/badContainer)

An error that occurs when you use an unknown or unauthorized container.

[`case badDatabase`](/documentation/CloudKit/CKError/Code/badDatabase)

An error that occurs when the operation can’t complete for the specified database.

[`case batchRequestFailed`](/documentation/CloudKit/CKError/Code/batchRequestFailed)

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

[`case changeTokenExpired`](/documentation/CloudKit/CKError/Code/changeTokenExpired)

An error that occurs when the change token expires.

[`case constraintViolation`](/documentation/CloudKit/CKError/Code/constraintViolation)

An error that occurs when the server rejects the request because of a unique constraint violation.

[`case incompatibleVersion`](/documentation/CloudKit/CKError/Code/incompatibleVersion)

An error that occurs when the current app version is older than the oldest allowed version.

[`case internalError`](/documentation/CloudKit/CKError/Code/internalError)

A nonrecoverable error that CloudKit encounters.

[`case invalidArguments`](/documentation/CloudKit/CKError/Code/invalidArguments)

An error that occurs when the request contains invalid information.

[`case limitExceeded`](/documentation/CloudKit/CKError/Code/limitExceeded)

An error that occurs when a request’s size exceeds the limit.

[`case managedAccountRestricted`](/documentation/CloudKit/CKError/Code/managedAccountRestricted)

An error that occurs when CloudKit rejects a request due to a managed-account restriction.

[`case missingEntitlement`](/documentation/CloudKit/CKError/Code/missingEntitlement)

An error that occurs when the app is missing a required entitlement.

[`case networkFailure`](/documentation/CloudKit/CKError/Code/networkFailure)

An error that occurs when a network is available, but CloudKit is inaccessible.

[`case networkUnavailable`](/documentation/CloudKit/CKError/Code/networkUnavailable)

An error that occurs when the network is unavailable.

[`case notAuthenticated`](/documentation/CloudKit/CKError/Code/notAuthenticated)

An error that occurs when CloudKit cannot authenticate the user.

[`case operationCancelled`](/documentation/CloudKit/CKError/Code/operationCancelled)

An error that occurs when an operation cancels.

[`case partialFailure`](/documentation/CloudKit/CKError/Code/partialFailure)

An error that occurs when an operation completes with partial failures.

[`case participantMayNeedVerification`](/documentation/CloudKit/CKError/Code/participantMayNeedVerification)

An error that occurs when the user isn’t a participant of the share.

[`case permissionFailure`](/documentation/CloudKit/CKError/Code/permissionFailure)

An error that occurs when the user doesn’t have permission to save or fetch data.

[`case quotaExceeded`](/documentation/CloudKit/CKError/Code/quotaExceeded)

An error that occurs when saving a record exceeds the user’s storage quota.

[`case referenceViolation`](/documentation/CloudKit/CKError/Code/referenceViolation)

An error that occurs when CloudKit can’t find the target of a reference.

[`case requestRateLimited`](/documentation/CloudKit/CKError/Code/requestRateLimited)

An error that occurs when CloudKit rate-limits requests.

[`case serverRecordChanged`](/documentation/CloudKit/CKError/Code/serverRecordChanged)

An error that occurs when CloudKit rejects a record because the server’s version is different.

[`case serverRejectedRequest`](/documentation/CloudKit/CKError/Code/serverRejectedRequest)

An error that occurs when CloudKit rejects the request.

[`case serverResponseLost`](/documentation/CloudKit/CKError/Code/serverResponseLost)

An error that occurs when CloudKit is unable to maintain the network connection and provide a response.

[`case serviceUnavailable`](/documentation/CloudKit/CKError/Code/serviceUnavailable)

An error that occurs when CloudKit is unavailable.

[`case tooManyParticipants`](/documentation/CloudKit/CKError/Code/tooManyParticipants)

An error that occurs when a share has too many participants.

[`case unknownItem`](/documentation/CloudKit/CKError/Code/unknownItem)

An error that occurs when the specified record doesn’t exist.

[`case userDeletedZone`](/documentation/CloudKit/CKError/Code/userDeletedZone)

An error that occurs when the user deletes a record zone using the Settings app.

[`case zoneBusy`](/documentation/CloudKit/CKError/Code/zoneBusy)

An error that occurs when the server is too busy to handle the record zone operation.

[`case zoneNotFound`](/documentation/CloudKit/CKError/Code/zoneNotFound)

An error that occurs when the specified record zone doesn’t exist.

[`case resultsTruncated`](/documentation/CloudKit/CKError/Code/resultsTruncated)

An error that occurs when CloudKit truncates a query’s results.

### Enumeration Cases

[`case participantAlreadyInvited`](/documentation/CloudKit/CKError/Code/participantAlreadyInvited)

The user is already an invited participant on this share. They must accept the existing share invitation before continuing.

### Initializers

[`init?(rawValue: Int)`](/documentation/CloudKit/CKError/Code/init(rawValue:))

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)