{"record":{"id":"1adff5e21a5f15b4","repo":"docker/cli","slug":"image-manifest-for-q-does-not-exist","errorCode":null,"errorMessage":"image manifest for %q does not exist","messagePattern":"image manifest for %q does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/registryclient/fetcher.go","lineNumber":66,"sourceCode":"\t}\n\n\tswitch v := manifest.(type) {\n\tcase *manifestlist.DeserializedManifestList:\n\t\treturn pullManifestList(ctx, ref, repo, *v)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported manifest format: %v\", v)\n\t}\n}\n\nfunc getManifest(ctx context.Context, repo distribution.Repository, ref reference.Named) (distribution.Manifest, error) {\n\tmanSvc, err := repo.Manifests(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdgst, opts, err := getManifestOptionsFromReference(ref)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"image manifest for %q does not exist\", ref)\n\t}\n\treturn manSvc.Get(ctx, dgst, opts...)\n}\n\nfunc pullManifestSchemaV2(ctx context.Context, ref reference.Named, repo distribution.Repository, mfst schema2.DeserializedManifest) (types.ImageManifest, error) {\n\tmanifestDesc, err := validateManifestDigest(ref, mfst)\n\tif err != nil {\n\t\treturn types.ImageManifest{}, err\n\t}\n\tconfigJSON, err := pullManifestSchemaV2ImageConfig(ctx, mfst.Target().Digest, repo)\n\tif err != nil {\n\t\treturn types.ImageManifest{}, err\n\t}\n\n\tif manifestDesc.Platform == nil {\n\t\tmanifestDesc.Platform = &ocispec.Platform{}\n\t}\n","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/docker/cli/blob/4f84911bfe8811e9b028e4b1fee8e7510be79387/internal/registryclient/fetcher.go#L48-L84","documentation":"getManifest wraps the error from getManifestOptionsFromReference, whose only failure is the bare-reference case (error 602). So this message appears when the reference has neither a tag nor a digest — phrased as \"does not exist\" because without a tag/digest there is no way to address the manifest.","triggerScenarios":"Fetching a manifest via a reference that is only a name (\"nginx\", \"library/nginx\") with no :tag and no @digest.","commonSituations":"Passing an untagged reference expecting an implicit latest; stripping the tag during ref manipulation; constructing a ref with reference.WithName alone.","solutions":["Attach a tag with reference.WithTag(ref, \"latest\") (or the intended tag).","Attach a digest with reference.WithDigest(ref, dgst) for immutable addressing.","Type-assert to reference.NamedTagged or reference.Canonical before calling.","Surface a user-facing \"tag or digest required\" error at the input boundary."],"exampleFix":"// before\nref, _ := reference.ParseNamed(\"library/nginx\")\nc.GetManifest(ctx, ref) // -> image manifest does not exist\n\n// after\nref, _ := reference.WithTag(reference.MustParseNamed(\"library/nginx\"), \"alpine\")\nc.GetManifest(ctx, ref)","handlingStrategy":"validation","validationCode":"// Require a tag or digest before any manifest fetch.\nfunc requireAddressable(ref reference.Named) (reference.Named, error) {\n    switch ref.(type) {\n    case reference.NamedTagged, reference.Canonical:\n        return ref, nil\n    }\n    return nil, fmt.Errorf(\"reference %s has no tag or digest\", ref)\n}","typeGuard":"func isAddressable(ref reference.Named) bool {\n    switch ref.(type) {\n    case reference.NamedTagged, reference.Canonical:\n        return true\n    default:\n        return false\n    }\n}","tryCatchPattern":null,"preventionTips":["Always attach a tag or digest at construction time.","Validate addressability at the input boundary.","Never assume an implicit latest at this layer."],"tags":["docker","registry","reference","validation"],"backgroundTag":null,"analyzedSha":"4f84911bfe8811e9b028e4b1fee8e7510be79387","analyzedAt":"2026-08-07T12:15:29.814Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}