-
Notifications
You must be signed in to change notification settings - Fork 171
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
Conversation
Codecov Report
@@ 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>
cmd/oras/manifest/fetch.go
Outdated
} | ||
if err != nil { | ||
if errors.Is(err, errdef.ErrNotFound) { | ||
return fmt.Errorf("no matching manifest was found in %s", opts.targetRef) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
?
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Zoey Li <zoeyli@microsoft.com>
Improve error message on platform mismatch
Resolves: #498
Signed-off-by: Zoey Li zoeyli@microsoft.com