Skip to content

Bug: Inconsistent error handling for data source failures #25

Description

@leogdion

Problem

Data source failures are handled inconsistently in DataSourcePipeline:

  • ipsw.me (line 228): Failures throw and halt entire sync
  • AppleDB (line 269): Failures continue silently with warning

This creates unpredictable behavior and makes it unclear which sources are required vs optional.

Proposed Solution

  1. Document strategy: Define required vs optional data sources
  2. Consistent handling: Either all optional (best effort) or mark some as required
  3. Partial success reporting: Return information about which sources succeeded/failed

Example:

struct FetchResult {
    let images: [RestoreImageRecord]
    let xcodeVersions: [XcodeVersionRecord]
    let failures: [DataSourceFailure]
}
  1. Validate dependencies: Ensure RecordInfo.isError property exists in MistKit (BushelCloudKitService.swift:106)

Impact

  • Reliability: Predictable behavior for source failures
  • Debugging: Clear indication of which sources failed
  • User Experience: Better error messages

Files Affected

  • Examples/Bushel/Sources/BushelImages/DataSources/DataSourcePipeline.swift:228, 269
  • Examples/Bushel/Sources/BushelImages/CloudKit/BushelCloudKitService.swift:106

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions