{"record":{"id":"3cc27a22641e0446","repo":"goharbor/harbor","slug":"no-artifact-id-to-get-sbom-report-data","errorCode":null,"errorMessage":"no artifact id to get sbom report data","messagePattern":"no artifact id to get sbom report data","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/scan/sbom/manager.go","lineNumber":152,"sourceCode":"}\n\nfunc (bm *basicManager) Delete(ctx context.Context, uuid string) error {\n\tquery := q.Query{Keywords: q.KeyWords{\"uuid\": uuid}}\n\tcount, err := bm.dao.DeleteMany(ctx, query)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif count == 0 {\n\t\treturn errors.Errorf(\"no report with uuid %s deleted\", uuid)\n\t}\n\treturn nil\n}\n\n// GetBy ...\nfunc (bm *basicManager) GetBy(ctx context.Context, artifactID int64, registrationUUID string,\n\tmimeType string, mediaType string) ([]*model.Report, error) {\n\tif artifactID == 0 {\n\t\treturn nil, errors.New(\"no artifact id to get sbom report data\")\n\t}\n\n\tkws := make(map[string]any)\n\tkws[\"artifact_id\"] = artifactID\n\tif len(registrationUUID) > 0 {\n\t\tkws[\"registration_uuid\"] = registrationUUID\n\t}\n\tif len(mimeType) > 0 {\n\t\tkws[\"mine_type\"] = mimeType\n\t}\n\tif len(mediaType) > 0 {\n\t\tkws[\"media_type\"] = mediaType\n\t}\n\t// Query all\n\tquery := &q.Query{\n\t\tPageNumber: 0,\n\t\tKeywords:   kws,\n\t}","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/scan/sbom/manager.go#L134-L170","documentation":"Error \"no artifact id to get sbom report data\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/scan/sbom/manager.go:152 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"}