<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSItemProvider/ErrorCode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSItemProviderErrorCode"
  },
  "title" : "NSItemProvider.ErrorCode"
}
-->

# NSItemProvider.ErrorCode

The error codes that describe problems with consuming data from an item provider.

```
enum ErrorCode
```

## Topics

### Constants

[`NSItemProviderItemUnavailableError`](/documentation/Foundation/NSItemProvider/ErrorCode/itemUnavailableError)

An error code indicating that the requested data was unavailable from an item provider.

[`NSItemProviderUnavailableCoercionError`](/documentation/Foundation/NSItemProvider/ErrorCode/unavailableCoercionError)

An error code indicating that the requested data type coercion is unavailable from an item provider.

[`NSItemProviderUnexpectedValueClassError`](/documentation/Foundation/NSItemProvider/ErrorCode/unexpectedValueClassError)

An error code indicating that type coercion to the requested class failed.

[`NSItemProviderUnknownError`](/documentation/Foundation/NSItemProvider/ErrorCode/unknownError)

An error code indicating an unknown error with consuming data from an item provider.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)