gograph_errorflow
Trace error sentinels or messages from definition to HTTP/CLI entry points, showing propagation paths and return sites.
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. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. 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 |
|---|---|---|---|
| term | No | The error string or sentinel error name (e.g., 'ErrInvalidToken' or 'invalid token') | |
| query | No | The error string or sentinel error name (preferred over term) | |
| no_tests | No | If true, exclude test files from related-test collection (matches CLI --no-tests) |