Skip to content

Commit

Permalink
Fire event if secure store fetch fails
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme committed Oct 30, 2024
1 parent e5946ee commit 4dcc4ae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/DDGSync/DDGSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,14 @@ public class DDGSync: DDGSyncing {
}

public var account: SyncAccount? {
try? dependencies.secureStore.account()
do {
return try dependencies.secureStore.account()
} catch {
if let syncError = error as? SyncError {
dependencies.errorEvents.fire(syncError, error: syncError)
}
return nil
}
}

public var scheduler: Scheduling {
Expand Down

0 comments on commit 4dcc4ae

Please sign in to comment.