gograph_errorflow
Trace a named error's definition, return sites, and propagation paths up the call graph to entry points for auditing end-to-end error handling.
Instructions
Trace how a named error sentinel or error message string is defined, returned, and propagates up the call graph toward HTTP handlers or CLI entry points. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Accepts either query (preferred) or term as the error name or message substring. WHEN TO USE: When auditing how a specific error is produced and handled end-to-end — find definition sites, all return sites, and upstream propagation paths (e.g., ErrNotFound). NOT TO USE: For general upstream traversal of any function (use gograph_callers or gograph_impact); for listing all error definitions (use gograph_errors). RETURNS: Definition sites, return sites, propagation path chains, and related test names; paths is empty when no propagation chain is found. Note: heuristic analysis — does not perform SSA or full data-flow tracking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| no_tests | No | If true, exclude test files from related-test collection (matches CLI --no-tests) | |
| query | No | The error string or sentinel error name (preferred over term) | |
| term | No | The error string or sentinel error name (e.g., 'ErrInvalidToken' or 'invalid token') |