Improved type safety, local auth support, and better error handling
This commit is contained in:
parent
cea23bb06e
commit
bb3d349993
14 changed files with 556 additions and 576 deletions
15
Sources/KeychainKit/Enums/KeychainError.swift
Normal file
15
Sources/KeychainKit/Enums/KeychainError.swift
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import Foundation
|
||||
|
||||
/// Errors that can occur during Keychain operations.
|
||||
public enum KeychainError: Error {
|
||||
/// Authentication failed, e.g., due to biometric or passcode denial.
|
||||
case authenticationFailed
|
||||
/// No item found matching the query.
|
||||
case itemNotFound
|
||||
/// Unexpected or corrupted data found in Keychain item.
|
||||
case unexpectedData
|
||||
/// An unexpected OSStatus error code returned by Keychain API.
|
||||
case unexpectedCode(OSStatus)
|
||||
/// A generic unexpected error, with optional underlying error info.
|
||||
case unexpectedError(Error?)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue