goharbor/harbor · error

no artifact id to get sbom report data

Error message

no artifact id to get sbom report data

What it means

Error "no artifact id to get sbom report data" thrown in goharbor/harbor.

Source

Thrown at src/pkg/scan/sbom/manager.go:152

}

func (bm *basicManager) Delete(ctx context.Context, uuid string) error {
	query := q.Query{Keywords: q.KeyWords{"uuid": uuid}}
	count, err := bm.dao.DeleteMany(ctx, query)
	if err != nil {
		return err
	}
	if count == 0 {
		return errors.Errorf("no report with uuid %s deleted", uuid)
	}
	return nil
}

// GetBy ...
func (bm *basicManager) GetBy(ctx context.Context, artifactID int64, registrationUUID string,
	mimeType string, mediaType string) ([]*model.Report, error) {
	if artifactID == 0 {
		return nil, errors.New("no artifact id to get sbom report data")
	}

	kws := make(map[string]any)
	kws["artifact_id"] = artifactID
	if len(registrationUUID) > 0 {
		kws["registration_uuid"] = registrationUUID
	}
	if len(mimeType) > 0 {
		kws["mine_type"] = mimeType
	}
	if len(mediaType) > 0 {
		kws["media_type"] = mediaType
	}
	// Query all
	query := &q.Query{
		PageNumber: 0,
		Keywords:   kws,
	}

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/pkg/scan/sbom/manager.go:152 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/3cc27a22641e0446. Report an issue: GitHub.