Skip to content

fix: preserve per-reference error context in ClientImage.save() and update callers#1223

Open
meet114 wants to merge 1 commit intoapple:mainfrom
meet114:main
Open

fix: preserve per-reference error context in ClientImage.save() and update callers#1223
meet114 wants to merge 1 commit intoapple:mainfrom
meet114:main

Conversation

@meet114
Copy link
Copy Markdown

@meet114 meet114 commented Feb 16, 2026

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

The ClientImage.save() method had a TODO to improve error handling. Previously, get(names:) returned failed references as plain strings, discarding the underlying error cause (e.g., not found vs. parse failure vs. network error). The save() method then threw a generic .invalidArgument error with no detail about why each reference failed. This made it difficult for users to diagnose and fix issues when saving multiple images. This change introduces ImageLookupError to preserve per-reference error context, updates all callers (save(), ImageInspect, ImageDelete) to use the richer error type, and changes the error code to the more semantically accurate .notFound.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants