goharbor/harbor · error · lib/errors.Error
BAD_REQUEST
BAD_REQUEST
Error message
the processor for artifact %s not found, cannot get the addition
What it means
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.
Source
Thrown at src/controller/artifact/processor/default.go:134
}
// Populate all metadata into the ExtraAttrs first.
artifact.ExtraAttrs = metadata
}
annotationParser := annotation.NewParser()
err := annotationParser.Parse(ctx, artifact, manifest)
if err != nil {
log.Errorf("the annotation parser parse annotation for artifact error: %v", err)
}
return nil
}
func (d *defaultProcessor) AbstractAddition(_ context.Context, artifact *artifact.Artifact, _ string) (*Addition, error) {
// Addition not support for user-defined artifact yet.
// It will be support in the future.
// return error directly
return nil, errors.New(nil).WithCode(errors.BadRequestCode).
WithMessagef("the processor for artifact %s not found, cannot get the addition", artifact.Type)
}
View on GitHub (pinned to 7b2fd08cc5)
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
Defensive patterns
Strategy: type-guard
Type guard
var additionCapableTypes = map[string]bool{
"IMAGE": true, "CHART": true, "CNAI": true, "WASM": true,
}
func artifactHasAdditionSupport(artifactType string) bool {
return additionCapableTypes[artifactType] // custom/user-defined types -> false
} Try / catch
add, err := artifactCtl.GetAddition(ctx, art.ID, addition)
if err != nil {
if errors.IsErr(err, errors.BadRequestCode) && strings.Contains(err.Error(), "cannot get the addition") {
// custom artifact type with no processor: read layers via the blob API instead
}
} Prevention
- 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
When it happens
Trigger: GET .../artifacts/{ref}/additions/{anything} on an artifact whose manifest config mediaType has no registered processor, so artifact.Type is the custom type string.
Common situations: ORAS pushes with arbitrary config media types, in-house artifact formats, signatures/blobs pushed as standalone manifests.
Related errors
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/a4644a2aec5687fc.
Report an issue: GitHub.