{"record":{"id":"e9d5a39b963f540a","repo":"owasp-amass/amass","slug":"no-matching-org-found","errorCode":null,"errorMessage":"no matching org found","messagePattern":"no matching org found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"engine/plugins/support/org/find.go","lineNumber":206,"sourceCode":"\tfor _, cr := range crecords {\n\t\tif edges, err := sess.DB().OutgoingEdges(ctx, cr, time.Time{}, \"organization\"); err == nil {\n\t\t\tfor _, edge := range edges {\n\t\t\t\tif a, err := sess.DB().FindEntityById(ctx, edge.ToEntity.ID); err == nil && a != nil {\n\t\t\t\t\tif _, ok := a.Asset.(*oamorg.Organization); ok {\n\t\t\t\t\t\torgents = append(orgents, a)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfor _, orgent := range orgents {\n\t\tif _, _, found := NameMatch(sess, orgent, names); found {\n\t\t\treturn orgent, nil\n\t\t}\n\t}\n\n\treturn nil, errors.New(\"no matching org found\")\n}\n\nfunc matchingLocations(sess et.Session, locs []*dbt.Entity) []*dbt.Entity {\n\tvar newlocs []*dbt.Entity\n\n\tset := stringset.New()\n\tdefer set.Close()\n\n\tfor _, loc := range locs {\n\t\tset.Insert(loc.ID)\n\t}\n\n\tfor _, loc := range locs {\n\t\tlasset, valid := loc.Asset.(*oamcon.Location)\n\t\tif !valid {\n\t\t\tcontinue\n\t\t}\n","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/engine/plugins/support/org/find.go#L188-L224","documentation":"After gathering candidate organizations that share a location entity with the input, existsAndSharesLocEntity compares each candidate's names against the input org's names using NameMatch. If none match, the function concludes no deduplicated Organization exists on the graph and returns this sentinel error; callers treat it as 'create a new org'.","triggerScenarios":"Calling CreateOrgAsset with an org that shares a legal/HQ address or location with existing orgs but whose Name/LegalName differs from every candidate (after normalization) — e.g. same address, different company.","commonSituations":"Subsidiaries of the same parent sharing an HQ address; coworking/virtual-office addresses hosting many distinct companies; name normalization (case, punctuation, legal suffixes) causing a false mismatch; the org genuinely being new.","solutions":["This is usually expected behavior: create the new Organization (the callers treat this error as 'not found')","Verify NameMatch's normalization rules match your naming conventions (Inc./LLC/Ltd suffixes, casing)","Ensure o.LegalName is populated when the legal name differs from the display name, improving match coverage","Check for typos or alternate spellings in the source data"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"existing, err := FindOrgByName(sess, org.Name)\nif err == nil {\n    // reuse existing\n} else {\n    // create new org — this error is the normal 'not found' path\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat this error as the expected 'create new org' signal, not a failure","Provide both Name and LegalName to maximize match coverage","Keep name normalization consistent across ingestion runs"],"tags":["go","deduplication","entity-not-found","organization"],"backgroundTag":"entity-not-found","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}