Skip to content

Commit

Permalink
Use NSError as param for equality
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme committed Nov 8, 2024
1 parent e61bbd9 commit 1ee048c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/DDGSync/SyncError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public enum SyncError: Error, Equatable {
case failedToWriteSecureStore(status: OSStatus)
case failedToReadSecureStore(status: OSStatus)
case failedToRemoveSecureStore(status: OSStatus)
case failedToDecodeSecureStoreData(error: Error)
case failedToDecodeSecureStoreData(error: NSError)

case credentialsMetadataMissingBeforeFirstSync
case receivedCredentialsWithoutUUID
Expand Down
2 changes: 1 addition & 1 deletion Sources/DDGSync/internal/SecureStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct SecureStorage: SecureStoring {
do {
return try JSONDecoder.snakeCaseKeys.decode(SyncAccount.self, from: data)
} catch {
throw SyncError.failedToDecodeSecureStoreData(error: error)
throw SyncError.failedToDecodeSecureStoreData(error: error as NSError)
}
}

Expand Down

0 comments on commit 1ee048c

Please sign in to comment.