gograph_errors
Find all error creation sites (errors.New, fmt.Errorf, sentinel var declarations) in a Go codebase. Filter by error message substring to check if an error string already exists.
Instructions
Find all error creation sites in the codebase: errors.New, fmt.Errorf, and sentinel var declarations. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Optional term filters by error message substring (e.g., "ErrInvalid", "unauthorized"). WHEN TO USE: When cataloging error codes, standardizing error messages, or checking whether a specific error string is already defined before adding a new one. NOT TO USE: For tracing how an error propagates up the call stack (use gograph_errorflow instead). RETURNS: List of error creation sites with message text, file path, and line number; empty when no matches found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | Optional keyword to filter the returned error structures (e.g., 'ErrInvalid', 'unauthorized') |