goharbor/harbor · error · NotFoundError

manifest not found in local registry

Error message

manifest %v not found in local registry

What it means

NotFound error from proxy controller getManifestDigestInLocal: local.GetManifest returned no manifest for the repository, so the digest cannot be resolved from the local registry. Callers use this to decide whether to fetch from upstream - a miss is a normal cache-miss signal wrapped as NotFound.

Solutions

  1. Treat as a cache miss and fetch the manifest from the upstream registry.
  2. Verify the repository name and digest in the ArtifactInfo are correct.
  3. Check whether the artifact was evicted from the proxy cache.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/controller/proxy/controller.go:160 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/60bebb4017855bef. Report an issue: GitHub.

Appendix: source

Thrown at src/controller/proxy/controller.go:160

	return exist
}

// ManifestList ...
type ManifestList struct {
	Content     []byte
	Digest      string
	ContentType string
}

// getManifestDigestInLocal get the artifact digest in local
func (c *controller) getManifestDigestInLocal(ctx context.Context, art lib.ArtifactInfo) (string, error) {
	// Get the manifest from local registry
	a, err := c.local.GetManifest(ctx, art)
	if err != nil {
		return "", err
	}
	if a == nil {
		return "", errors.NotFoundError(fmt.Errorf("manifest %v not found in local registry", art.Repository))
	}
	if len(a.Digest) == 0 {
		return "", errors.NotFoundError(fmt.Errorf("manifest %v not found in local registry", art.Repository))
	}
	return a.Digest, nil
}

// UseLocalManifest check if these manifest could be found in local registry,
// the return error should be nil when it is not found in local and need to delegate to remote registry
// the return error should be NotFoundError when it is not found in remote registry
// the error will be captured by framework and return 404 to client
func (c *controller) UseLocalManifest(ctx context.Context, art lib.ArtifactInfo, remote RemoteInterface, p *proModels.Project) (bool, *ManifestList, error) {
	a, err := c.local.GetManifest(ctx, art)
	if err != nil {
		return false, nil, err
	}
	// Pull by digest when artifact exist in local
	if a != nil && len(art.Digest) > 0 {

View on GitHub (pinned to 7b2fd08cc5)