Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion DuckDuckGo/Configuration/ConfigurationStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ final class ConfigurationStore: ConfigurationStoring {
} catch {
guard !NSApp.isRunningUnitTests else { return nil }

Pixel.fire(.debug(event: .trackerDataCouldNotBeLoaded, error: error))
let nserror = error as NSError

if nserror.domain != NSCocoaErrorDomain || nserror.code != NSFileReadNoSuchFileError {
Pixel.fire(.debug(event: .trackerDataCouldNotBeLoaded, error: error))
}

Comment on lines +99 to +104
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've considered to add tests to validate that this code is doing what it should, but the problem is Pixel isn't easy to inject for implementing tests, and I don't want to derail the scope of these changes or introduce complexity to this PR.

return nil
}
}
Expand Down