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

Handle invalid media type error in registry pull #3244

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kichristensen
Copy link
Contributor

What does this change

Improves the error message when using non-bundle references.

What issue does it fix

Closes #904

Notes for the reviewer

The optimal solution would be to improve the error message in cnab-to-oci, but until that can be accomplished this at least provides a more user-friendly error message.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

- Added error handling for invalid media type in `PullBundle` method
  to ensure the provided reference is a Porter bundle.
- Updated integration tests to cover the scenario of pulling a Docker
  image as a bundle.

Signed-off-by: Kim Christensen <[email protected]>
@kichristensen kichristensen marked this pull request as ready for review November 2, 2024 23:29
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 when a docker image is passed to --reference
1 participant