container icon indicating copy to clipboard operation
container copied to clipboard

refactor: improve image lookup error diagnostics and update call sites

Open Ronitsabhaya75 opened this issue 6 months ago • 0 comments

Type of Change

  • [x] Bug fix
  • [ ] New feature
  • [ ] Breaking change
  • [ ] Documentation update

Motivation and Context

This change updates ClientImage.get(names:containerSystemConfig:) to return errors: [(String, Error)] instead of error: [String].

Previously, when looking up or saving multiple images, failures only reported the raw reference names. By propagating the actual underlying Swift Error objects along with the failed names, commands like save and delete can output precise, localized error descriptions (e.g., distinguishing an "image not found" error from other network or service failures).

All internal callers (ImageDelete, ImageInspect, and ClientImage.save) have been updated to consume this rich diagnostic information.

Testing

  • [x] Tested locally
  • [x] Added/updated tests
  • [ ] Added/updated docs

@renish-patel thanks for helping me

Ronitsabhaya75 avatar May 22 '26 16:05 Ronitsabhaya75