{"record":{"id":"8914756b6d13c238","repo":"goharbor/harbor","slug":"not-found-891475","errorCode":"NOT_FOUND","errorMessage":"license layer not found","messagePattern":"license layer not found","errorType":"http","errorClass":"NotFoundError","httpStatus":404,"severity":"error","filePath":"src/controller/artifact/processor/cnai/parser/license.go","lineNumber":66,"sourceCode":"\t// lookup the license 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 == \"LICENSE\" || filepath == \"LICENSE.txt\" {\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(\"license layer not found\"))\n\t}\n\n\treturn l.base.Parse(ctx, artifact, layer)\n}\n","sourceCodeStart":48,"sourceCodeEnd":71,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/artifact/processor/cnai/parser/license.go#L48-L71","documentation":"Error \"license layer not found\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/controller/artifact/processor/cnai/parser/license.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"}