owasp-amass/amass · warning
GLEIFSearchFuzzyCompletions: no results found
Error message
GLEIFSearchFuzzyCompletions: no results found
What it means
After successfully decoding the GLEIF response, GLEIFSearchFuzzyCompletions checks that at least one LEI record was returned. If result.Data is empty, it returns this sentinel-style error indicating the GLEIF API had no fuzzy matches for the queried name. This is an expected, non-fatal outcome for many inputs.
Source
Thrown at engine/plugins/api/gleif/gleif.go:49
func GLEIFSearchFuzzyCompletions(ctx context.Context, name string) (*FuzzyCompletionsResponse, error) {
u := "https://api.gleif.org/api/v1/fuzzycompletions?field=entity.legalName&q=" + url.QueryEscape(name)
_ = gleifLimit.Wait(ctx)
wctx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()
resp, err := amasshttp.RequestWebPage(wctx, amasshttp.DefaultClient, &amasshttp.Request{URL: u})
if err != nil || resp.Body == "" {
msg := fmt.Sprintf("Failed to obtain the LEI record for %s: %s", name, err)
return nil, fmt.Errorf("GLEIFSearchFuzzyCompletions: %s", msg)
}
var result FuzzyCompletionsResponse
if err := json.Unmarshal([]byte(resp.Body), &result); err != nil {
msg := fmt.Sprintf("Failed to unmarshal the LEI record for %s: %s", name, err)
return nil, fmt.Errorf("GLEIFSearchFuzzyCompletions: %s", msg)
} else if len(result.Data) == 0 {
return nil, fmt.Errorf("GLEIFSearchFuzzyCompletions: no results found")
}
return &result, nil
}
// GLEIFGetLEIRecord retrieves the LEI record for the given identifier.
func GLEIFGetLEIRecord(ctx context.Context, id string) (*LEIRecord, error) {
u := "https://api.gleif.org/api/v1/lei-records/" + id
_ = gleifLimit.Wait(ctx)
wctx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()
resp, err := amasshttp.RequestWebPage(wctx,
amasshttp.DefaultClient, &amasshttp.Request{URL: u})
if err != nil || resp.StatusCode != 200 || resp.Body == "" {
return nil, err
}View on GitHub (pinned to 79299dce87)
Solutions
- Confirm the queried name is an actual legal entity name registered with GLEIF; try the exact legal name.
- Shorten the query to the core organization name to widen fuzzy matching.
- Treat this as an expected empty result in the caller and skip this data source rather than failing the scan.
- Try the exact-match GLEIF search endpoint or search by LEI identifier if known.
- Check the query URL parameters (page size, filters) are not accidentally over-restricting results.
Example fix
// before
} else if len(result.Data) == 0 {
return nil, fmt.Errorf("GLEIFSearchFuzzyCompletions: no results found")
}
// after
} else if len(result.Data) == 0 {
return nil, nil // or a typed sentinel: ErrNoGLEIFResults, so callers can errors.Is and skip gracefully
} Defensive patterns
Strategy: fallback
Try / catch
result, err := GLEIFSearchFuzzyCompletions(ctx, name)
if err != nil && strings.HasSuffix(err.Error(), "no results found") {
// expected: continue with other data sources
return nil
} Prevention
- Treat empty GLEIF results as expected for non-entity names
- Query with the organization's legal name
- Fall back to other registry data sources
- Do not fail the whole scan on empty registry results
When it happens
Trigger: A valid HTTP 200 response with a well-formed FuzzyCompletionsResponse whose Data array has length 0 — i.e., GLEIF found no organizations matching the submitted name.
Common situations: Querying GLEIF for a name that is not a registered legal entity (person names, product names, subdomains); misspelled or highly localized company names; querying with overly specific strings instead of the legal name.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- zero decoded assets
- no matching organizations were found
- createSession: status=%s
- createSession: status=%s error=%s
- listSessions: status=%s
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/9d7a906f1bfbec2c.
Report an issue: GitHub.