<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:@E@CNErrorCode"
  },
  "title" : "CNError.Code"
}
-->

# CNError.Code

Error codes that the system may return when you use Contacts framework methods.

```
enum Code
```

## Topics

### Errors

[`CNErrorCodeAuthorizationDenied`](/documentation/Contacts/CNError/Code/authorizationDenied)

An error that indicates the system denied authorization.

[`CNErrorCodeChangeHistoryExpired`](/documentation/Contacts/CNError/Code/changeHistoryExpired)

An error that indicates the change history expired.

[`CNErrorCodeChangeHistoryInvalidAnchor`](/documentation/Contacts/CNError/Code/changeHistoryInvalidAnchor)

An error that indicates a change history anchor is invalid.

[`CNErrorCodeChangeHistoryInvalidFetchRequest`](/documentation/Contacts/CNError/Code/changeHistoryInvalidFetchRequest)

An error that indicates a change history fetch request is invalid.

[`CNErrorCodeClientIdentifierCollision`](/documentation/Contacts/CNError/Code/clientIdentifierCollision)

An error that indicates a client identifier collision.

[`CNErrorCodeClientIdentifierInvalid`](/documentation/Contacts/CNError/Code/clientIdentifierInvalid)

An error that indicates the client identifier is invalid.

[`CNErrorCodeClientIdentifierDoesNotExist`](/documentation/Contacts/CNError/Code/clientIdentifierDoesNotExist)

An error that indicates the client identifier doesn’t exist.

[`CNErrorCodeCommunicationError`](/documentation/Contacts/CNError/Code/communicationError)

An error that indicates a communication error occurred.

[`CNErrorCodeContainmentCycle`](/documentation/Contacts/CNError/Code/containmentCycle)

An error with the containment cycle.

[`CNErrorCodeContainmentScope`](/documentation/Contacts/CNError/Code/containmentScope)

An error with containment scope.

[`CNErrorCodeDataAccessError`](/documentation/Contacts/CNError/Code/dataAccessError)

An error with data access.

[`CNErrorCodeFeatureDisabledByUser`](/documentation/Contacts/CNError/Code/featureDisabledByUser)

An error that indicates the user disabled the feature.

[`CNErrorCodeFeatureNotAvailable`](/documentation/Contacts/CNError/Code/featureNotAvailable)

An error that indicates the feature isn’t available.

[`CNErrorCodeInsertedRecordAlreadyExists`](/documentation/Contacts/CNError/Code/insertedRecordAlreadyExists)

An error that indicates the inserted record already exists.

[`CNErrorCodeNoAccessableWritableContainers`](/documentation/Contacts/CNError/Code/noAccessableWritableContainers)

An error that indicates there are no accessible writable containers.

[`CNErrorCodeParentContainerNotWritable`](/documentation/Contacts/CNError/Code/parentContainerNotWritable)

An error that indicates the parent container isn’t writable.

[`CNErrorCodeParentRecordDoesNotExist`](/documentation/Contacts/CNError/Code/parentRecordDoesNotExist)

An error that indicates the parent record doesn’t exist.

[`CNErrorCodePolicyViolation`](/documentation/Contacts/CNError/Code/policyViolation)

An error that indicates a policy violation.

[`CNErrorCodePredicateInvalid`](/documentation/Contacts/CNError/Code/predicateInvalid)

An error that indicates an invalid predicate.

[`CNErrorCodeRecordDoesNotExist`](/documentation/Contacts/CNError/Code/recordDoesNotExist)

An error that indicates a record doesn’t exist.

[`CNErrorCodeRecordIdentifierInvalid`](/documentation/Contacts/CNError/Code/recordIdentifierInvalid)

An error that indicates a record identifier is invalid.

[`CNErrorCodeRecordNotWritable`](/documentation/Contacts/CNError/Code/recordNotWritable)

An error that indicates a record isn’t writable.

[`CNErrorCodeUnauthorizedKeys`](/documentation/Contacts/CNError/Code/unauthorizedKeys)

An error that indicates unauthorized keys usage.

[`CNErrorCodeValidationMultipleErrors`](/documentation/Contacts/CNError/Code/validationMultipleErrors)

An error that indicates the system encountered multiple validation errors.

[`CNErrorCodeValidationTypeMismatch`](/documentation/Contacts/CNError/Code/validationTypeMismatch)

A validation error that indicates a type mismatch.

[`CNErrorCodeValidationConfigurationError`](/documentation/Contacts/CNError/Code/validationConfigurationError)

An error with validation configuration.

[`CNErrorCodeVCardMalformed`](/documentation/Contacts/CNError/Code/vCardMalformed)

An error that indicates a malformed vCard.

[`CNErrorCodeVCardSummarizationError`](/documentation/Contacts/CNError/Code/vCardSummarizationError)

An error that indicates a vCard summarization problem.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)