When tracking down bugs, search systematically from symptom to cause.
Task Progress:
- [ ] Search for error
- [ ] Find where thrown
- [ ] Understand context
- [ ] Check recent changes
mcp__sourcegraph__keyword_search: "repo:X 'INVALID_TOKEN_ERROR'"
Search for:
- Exact error message text
- Error codes or constants
- Exception class names
- Log message patterns
mcp__sourcegraph__find_references: Trace the error symbol
Locate all places this error can originate:
- Direct throw statements
- Wrapper functions
- Error factories
mcp__sourcegraph__deepsearch_read: "When is INVALID_TOKEN_ERROR thrown and how should it be handled?"
Get deeper understanding of:
- Conditions that trigger the error
- Expected handling patterns
- Related error types
mcp__sourcegraph__diff_search: "repo:X INVALID_TOKEN_ERROR"
mcp__sourcegraph__commit_search: repos=["X"] messageTerms=["token", "auth"]
Look for recent modifications that might have introduced the bug.
- Extract exact symbols from stack traces
- Errors often have multiple throw sites—check all of them
- Recent changes are prime suspects
- Check if error handling changed, not just the error source