{"record":{"id":"a4644a2aec5687fc","repo":"goharbor/harbor","slug":"bad-request-a4644a","errorCode":"BAD_REQUEST","errorMessage":"the processor for artifact %s not found, cannot get the addition","messagePattern":"the processor for artifact (.+?) not found, cannot get the addition","errorType":"validation","errorClass":"lib/errors.Error","httpStatus":400,"severity":"error","filePath":"src/controller/artifact/processor/default.go","lineNumber":134,"sourceCode":"\t\t}\n\t\t// Populate all metadata into the ExtraAttrs first.\n\t\tartifact.ExtraAttrs = metadata\n\t}\n\n\tannotationParser := annotation.NewParser()\n\terr := annotationParser.Parse(ctx, artifact, manifest)\n\tif err != nil {\n\t\tlog.Errorf(\"the annotation parser parse annotation for artifact error: %v\", err)\n\t}\n\n\treturn nil\n}\n\nfunc (d *defaultProcessor) AbstractAddition(_ context.Context, artifact *artifact.Artifact, _ string) (*Addition, error) {\n\t// Addition not support for user-defined artifact yet.\n\t// It will be support in the future.\n\t// return error directly\n\treturn nil, errors.New(nil).WithCode(errors.BadRequestCode).\n\t\tWithMessagef(\"the processor for artifact %s not found, cannot get the addition\", artifact.Type)\n}\n","sourceCodeStart":116,"sourceCodeEnd":137,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/controller/artifact/processor/default.go#L116-L137","documentation":"When no processor is registered for an artifact's media type — user-defined artifacts pushed with a custom config mediaType (e.g. via ORAS) — Harbor falls back to defaultProcessor. Its AbstractAddition returns BadRequest 'the processor for artifact %s not found, cannot get the addition': additions are not supported for custom artifact types yet.","triggerScenarios":"GET .../artifacts/{ref}/additions/{anything} on an artifact whose manifest config mediaType has no registered processor, so artifact.Type is the custom type string.","commonSituations":"ORAS pushes with arbitrary config media types, in-house artifact formats, signatures/blobs pushed as standalone manifests.","solutions":["Do not request additions on custom/user-defined artifacts","If you need to read attached files, fetch layers directly via the registry blob API","If you own the artifact format, register a processor that implements AbstractAddition and ListAdditionTypes"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":"var additionCapableTypes = map[string]bool{\n    \"IMAGE\": true, \"CHART\": true, \"CNAI\": true, \"WASM\": true,\n}\n\nfunc artifactHasAdditionSupport(artifactType string) bool {\n    return additionCapableTypes[artifactType] // custom/user-defined types -> false\n}","tryCatchPattern":"add, err := artifactCtl.GetAddition(ctx, art.ID, addition)\nif err != nil {\n    if errors.IsErr(err, errors.BadRequestCode) && strings.Contains(err.Error(), \"cannot get the addition\") {\n        // custom artifact type with no processor: read layers via the blob API instead\n    }\n}","preventionTips":["Check the artifact's config mediaType before pushing if you plan to use additions","For custom artifacts, fetch attached files via the registry blob API directly","Register a real processor for your artifact format if additions are required"],"tags":["go","harbor","custom-artifact","additions","bad-request","oras"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}