Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve error message on platform mismatch #500

Merged
merged 2 commits into from
Aug 17, 2022

Conversation

lizMSFT
Copy link
Contributor

@lizMSFT lizMSFT commented Aug 16, 2022

Improve error message on platform mismatch

Resolves: #498
Signed-off-by: Zoey Li zoeyli@microsoft.com

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2022

Codecov Report

Merging #500 (9b7055c) into main (ee74ae2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #500   +/-   ##
=======================================
  Coverage   71.90%   71.90%           
=======================================
  Files           9        9           
  Lines         388      388           
=======================================
  Hits          279      279           
  Misses         87       87           
  Partials       22       22           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Zoey Li <zoeyli@microsoft.com>
}
if err != nil {
if errors.Is(err, errdef.ErrNotFound) {
return fmt.Errorf("no matching manifest was found in %s", opts.targetRef)
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we distinguish tag not found vs. manifest not found vs. platform not found? or do we have a more friendly error message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about: Error: no manifest with platform invalid was found ?

cmd/oras/manifest/fetch.go Outdated Show resolved Hide resolved
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@shizhMSFT shizhMSFT merged commit 9e1d11c into oras-project:main Aug 17, 2022
TerryHowe pushed a commit to TerryHowe/oras that referenced this pull request Feb 2, 2023
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.

Improve error message on platform mismatch
3 participants