{"record":{"id":"924a5752fbb39c41","repo":"goharbor/harbor","slug":"not-found-924a57","errorCode":"NOT_FOUND","errorMessage":"readme layer not found","messagePattern":"readme layer not found","errorType":"http","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"src/controller/artifact/processor/cnai/parser/readme.go","lineNumber":66,"sourceCode":"\t// lookup the readme file layer.\n\tvar layer *ocispec.Descriptor\n\tfor _, desc := range manifest.Layers {\n\t\tif slices.Contains([]string{\n\t\t\tmodelspec.MediaTypeModelDoc,\n\t\t\tmodelspec.MediaTypeModelDocRaw,\n\t\t}, desc.MediaType) {\n\t\t\tif desc.Annotations != nil {\n\t\t\t\tfilepath := desc.Annotations[modelspec.AnnotationFilepath]\n\t\t\t\tif filepath == \"README\" || filepath == \"README.md\" {\n\t\t\t\t\tlayer = &desc\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif layer == nil {\n\t\treturn \"\", nil, errors.NotFoundError(fmt.Errorf(\"readme layer not found\"))\n\t}\n\n\t_, content, err := r.base.Parse(ctx, artifact, layer)\n\tif err != nil {\n\t\treturn \"\", nil, err\n\t}\n\n\treturn contentTypeMarkdown, content, nil\n}\n","sourceCodeStart":48,"sourceCodeEnd":76,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/artifact/processor/cnai/parser/readme.go#L48-L76","documentation":"Error \"readme layer not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/artifact/processor/cnai/parser/readme.go:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}