ENUM
StorageError
Contents
- Cases
writeError(cause:)readError(cause:)deleteError(cause:)unavailable(operation:category:code:)
public enum StorageError: Error
Storage error responses
Cases
writeError(cause:)
case writeError(cause: Error)
An error occurred while attempting to write to the storage.
The cause provides more detailed information about the error.
readError(cause:)
case readError(cause: Error)
An error occurred while attempting to read from the storage.
The cause provides more detailed information about the error.
deleteError(cause:)
case deleteError(cause: Error)
An error occurred while attempting to delete from the storage.
The cause provides more detailed information about the error.
unavailable(operation:category:code:)
case unavailable(operation: StorageOperation, category: StorageItemCategory, code: Int32?)
The storage backend was unavailable (for the built-in keychain: the device is locked, or the
configured access group is unusable — e.g. a missing Keychain Sharing entitlement). Surfaced as the
cause of the existing .readError/.writeError/.deleteError cases — it is not thrown in
place of a case clients already catch. Carries only non-sensitive, backend-agnostic diagnostic
context — operation, a generic item category, and an optional backend status code (e.g. a
keychain OSStatus, if any) — never a key or value.