Skip to content

Commit

Permalink
Underlying error handling for keychain SyncErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme committed Nov 4, 2024
1 parent 4dcc4ae commit 691102a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/DDGSync/SyncError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,14 @@ extension SyncError: CustomNSError {
}
}

public var errorUserInfo: [String: Any] {
switch self {
case .failedToReadSecureStore(let status), .failedToWriteSecureStore(let status), .failedToRemoveSecureStore(let status):
let underlyingError = NSError(domain: "secError", code: Int(status))
return [NSUnderlyingErrorKey: underlyingError]
default:
return [:]
}
}

}

0 comments on commit 691102a

Please sign in to comment.