Skip to content

Commit

Permalink
Prevent logging error when settings are not found in Keychain
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej Mihajlov committed Oct 13, 2023
1 parent 4d61747 commit d1127ad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class LoadTunnelConfigurationOperation: ResultOperation<Void> {
private func readSettings() -> Result<LatestTunnelSettings?, Error> {
Result { try SettingsManager.readSettings() }
.flatMapError { error in
if let error = error as? KeychainError, error == .itemNotFound {
if let error = error as? ReadSettingsVersionError,
let keychainError = error.underlyingError as? KeychainError, keychainError == .itemNotFound {
logger.debug("Settings not found in keychain.")

return .success(nil)
Expand Down

0 comments on commit d1127ad

Please sign in to comment.