Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
SabrinaTardio committed May 4, 2024
1 parent 8a66137 commit d85703a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions DuckDuckGo/Sync/SyncErrorHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ extension SyncErrorHandler: SyncAdapterErrorHandler {
private func handleError(_ error: Error, modelType: ModelType) {
switch error {
case let syncError as SyncError:
switch modelType {
case .bookmarks:
PixelKit.fire(DebugEvent(GeneralPixel.syncBookmarksFailed, error: syncError))
case .credentials:
PixelKit.fire(DebugEvent(GeneralPixel.syncCredentialsFailed, error: syncError))
}
handleSyncError(syncError, modelType: modelType)
default:
let nsError = error as NSError
Expand All @@ -191,12 +197,6 @@ extension SyncErrorHandler: SyncAdapterErrorHandler {
}

private func handleSyncError(_ syncError: SyncError, modelType: ModelType) {
switch modelType {
case .bookmarks:
PixelKit.fire(DebugEvent(GeneralPixel.syncBookmarksFailed, error: syncError))
case .credentials:
PixelKit.fire(DebugEvent(GeneralPixel.syncCredentialsFailed, error: syncError))
}
switch syncError {
case .unexpectedStatusCode(409):
switch modelType {
Expand Down

0 comments on commit d85703a

Please sign in to comment.