{"id":"18a111c0c58daa27","repo":"docker/cli","slug":"invalid-named-reference-bytes-s-w","errorCode":null,"errorMessage":"invalid named reference bytes: %s: %w","messagePattern":"invalid named reference bytes: (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/manifest/types/types.go","lineNumber":144,"sourceCode":"\treturn ImageManifest{\n\t\tRef:         &SerializableNamed{Named: ref},\n\t\tDescriptor:  desc,\n\t\tRaw:         raw,\n\t\tOCIManifest: manifest,\n\t}\n}\n\n// SerializableNamed is a reference.Named that can be serialized and deserialized\n// from JSON\ntype SerializableNamed struct {\n\treference.Named\n}\n\n// UnmarshalJSON loads the Named reference from JSON bytes\nfunc (s *SerializableNamed) UnmarshalJSON(b []byte) error {\n\tvar raw string\n\tif err := json.Unmarshal(b, &raw); err != nil {\n\t\treturn fmt.Errorf(\"invalid named reference bytes: %s: %w\", b, err)\n\t}\n\tvar err error\n\ts.Named, err = reference.ParseNamed(raw)\n\treturn err\n}\n\n// MarshalJSON returns the JSON bytes representation\nfunc (s *SerializableNamed) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(s.String())\n}\n","sourceCodeStart":126,"sourceCodeEnd":155,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/manifest/types/types.go#L126-L155","documentation":"Error \"invalid named reference bytes: %s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/manifest/types/types.go:144 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}