<!--
{
  "documentType" : "article",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/PhotoKit/error-constants",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Error Constants"
}
-->

# Error Constants

Error code constants for framework operations.

## Topics

### Constants

[`static var accessRestricted: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/accessRestricted)

An error that indicates the system configuration restricts access to the asset.

[`static var accessUserDenied: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/accessUserDenied)

An error that indicates the user denied access.

[`static var changeNotSupported: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/changeNotSupported)

An error that indicates the system doesn’t support the change request configuration.

[`static var identifierNotFound: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/identifierNotFound)

An error that indicates an identifier doesn’t exist.

[`static var internalError: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/internalError)

An error that indicates an internal error occurs.

[`static var invalidResource: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/invalidResource)

An error that indicates the asset resource validation failed.

[`static var libraryVolumeOffline: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/libraryVolumeOffline)

An error that indicates the photo library isn’t available because the file system volume that stores it isn’t mounted.

[`static var libraryInFileProviderSyncRoot: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/libraryInFileProviderSyncRoot)

An error that indicates the Photos library bundle is in a file provider sync directory, and the framework doesn’t support it.

[`static var limitExceeded: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/limitExceeded)

An error that indicates the request exceeds a limit.

[`static var missingResource: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/missingResource)

An error that indicates a missing asset resource.

[`static var multipleIdentifiersFound: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/multipleIdentifiersFound)

An error that indicates that more than one identifier exists.

[`static var networkAccessRequired: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/networkAccessRequired)

An error that indicates the request for an asset resource failed because it requires network access.

[`static var networkError: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/networkError)

An error that indicates the request for an asset resource fails because of a network connection error.

[`static var notEnoughSpace: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/notEnoughSpace)

An error that indicates insufficient space to perform the change.

[`static var operationInterrupted: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/operationInterrupted)

An error that indicates an interruption occurs and the operation can’t complete.

[`static var persistentChangeDetailsUnavailable: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/persistentChangeDetailsUnavailable)

An error that indicates the change details aren’t available for the persistent change.

[`static var persistentChangeTokenExpired: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/persistentChangeTokenExpired)

An error that indicates the library state is older than the available history of persistent changes.

[`static var relinquishingLibraryBundleToWriter: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/relinquishingLibraryBundleToWriter)

An error that indicates the photo library isn’t available because the user moves, renames, or deletes the system’s photo library.

[`static var requestNotSupportedForAsset: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/requestNotSupportedForAsset)

An error that indicates the system doesn’t support the request for the asset.

[`static var switchingSystemPhotoLibrary: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/switchingSystemPhotoLibrary)

An error that indicates the photo library isn’t available because the user switched the system’s photo library.

[`static var userCancelled: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/userCancelled)

An error that indicates the user cancels the asset retrieval or editing request.

[`static var invalid: PHPhotosError.Code`](/documentation/Photos/PHPhotosError-swift.struct/Code/invalid)

An error that indicates the operation isn’t valid.



---

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)