<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSMergePolicyType/errorMergePolicyType",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:@E@NSMergePolicyType@NSErrorMergePolicyType"
  },
  "title" : "NSMergePolicyType.errorMergePolicyType"
}
-->

# NSMergePolicyType.errorMergePolicyType

The default merge policy for all managed object contexts.

```
case errorMergePolicyType
```

## Discussion

If a save fails because of conflicting objects, you can find the IDs of those objects in error’s `userInfo` dictionary. Use the [`NSInsertedObjectsKey`](/documentation/CoreData/NSInsertedObjectsKey) and [`NSUpdatedObjectsKey`](/documentation/CoreData/NSUpdatedObjectsKey) keys to extract the object IDs.

---

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)