Skip to content

Improve error message when pulling a nonexistent catalog#439

Open
jchangx wants to merge 3 commits intodocker:mainfrom
jchangx:fix/catalog-pull-error-message
Open

Improve error message when pulling a nonexistent catalog#439
jchangx wants to merge 3 commits intodocker:mainfrom
jchangx:fix/catalog-pull-error-message

Conversation

@jchangx
Copy link
Copy Markdown
Contributor

@jchangx jchangx commented Mar 5, 2026

Summary

  • Detect MANIFEST_UNKNOWN and NAME_UNKNOWN OCI registry errors during catalog pull
  • Return a clear message instead of the raw transport error

Before:

❯ docker mcp catalog pull mcp/unknown-catalog
failed to read OCI catalog: failed to fetch image/artifact mcp/unknown-catalog: GET https://index.docker.io/v2/mcp/unknown-catalog/manifests/latest: MANIFEST_UNKNOWN: manifest unknown; unknown tag=latest

After:

❯ docker mcp catalog pull mcp/unknown-catalog
catalog not found: mcp/unknown-catalog

Detect MANIFEST_UNKNOWN and NAME_UNKNOWN OCI registry errors and
return a clear, concise message instead of the raw transport error.
@jchangx jchangx requested a review from a team as a code owner March 5, 2026 03:01
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b04de0a112

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

jchangx added 2 commits March 4, 2026 19:04
FullNameWithoutDigest strips digests and defaults to :latest, which
would misreport the identifier for digest-based pulls.
@jchangx jchangx requested review from cmrigney and saucow March 5, 2026 03:10
Copy link
Copy Markdown
Contributor

@xenoscopic xenoscopic left a comment

Choose a reason for hiding this comment

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

Clean, focused fix. The isNotFoundError helper correctly uses errors.As to unwrap through the OCI transport error chain and checks both MANIFEST_UNKNOWN and NAME_UNKNOWN codes. Test coverage is thorough including wrapped errors, non-matching transport errors, empty diagnostics, and mixed diagnostic lists. All CI green. LGTM.

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