diff --git a/Sources/DDGSync/SyncError.swift b/Sources/DDGSync/SyncError.swift index ef3faad38..78b68c4e0 100644 --- a/Sources/DDGSync/SyncError.swift +++ b/Sources/DDGSync/SyncError.swift @@ -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 [:] + } + } + }