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

[REQ] Provide more meaningful error messages #396

Closed
1 task
toddysm opened this issue Oct 27, 2023 · 3 comments · Fixed by #620
Closed
1 task

[REQ] Provide more meaningful error messages #396

toddysm opened this issue Oct 27, 2023 · 3 comments · Fixed by #620
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@toddysm
Copy link

toddysm commented Oct 27, 2023

What kind of request is this?

Improvement of existing experience

What is your request or suggestion?

Adding more user context to the error messages that Copa returns helps troubleshoot unattended use of the tool. For example, I made a mistake to call copa with wrong reference to the image using digest like this:

myrepo/myimage:sha:<digest>

And the returned error was:

level=error msg="unexpected: TagNameOnly did create Tagged ref"
Error: unexpected: TagNameOnly did create Tagged ref

The above error doesn't help the user to understand what the problem is and leaves her wondering.

Providing full context how the tool is invoked and what part of the invocation was wrong would be much friendlier.

Are you willing to submit PRs to contribute to this feature request?

  • Yes, I am willing to implement it.
@prakrit55
Copy link
Contributor

hey @sozercan, I would like to give it a try

@prakrit55
Copy link
Contributor

hello @sozercan when I tried with
copa patch -r nginx.1.21.6.json -i library/nginx:sha256:2bcabc23b45489fb0885d69a06ba1d648aeda973fae7bb981bafbb884165e514, its giving Error: invalid reference format. Is this an expected behavior ??

@ashnamehrotra
Copy link
Contributor

ashnamehrotra commented May 13, 2024

Hi @prakrit55 the correct format would be copa patch -r nginx.1.21.6.json -i library/nginx:1.21.6@sha256:2bcabc23b45489fb0885d69a06ba1d648aeda973fae7bb981bafbb884165e514. Created issue #624 to add documentation for this.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Copacetic Workboard May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants