continue-custom/.continue/agents/error-message-quality.md
Ty Dunn beca33f07a
feat: add 5 agent checks derived from codebase history (#10401)
* feat: add 5 agent checks derived from codebase history analysis

Add agent checks targeting the highest-impact areas identified from
analyzing recent PRs, open issues, and contribution patterns:

- error-message-quality: Catch swallowed errors and generic "Unknown error"
  messages (addresses 12/15 open issues being auth/integration errors)
- breaking-change-detector: Flag CLI renames, API changes, and URL updates
  that leave stale references (addresses 6 PRs in 8 days fixing the same
  CLI command rename)
- dependency-security-review: Meaningful review of dependency bumps for
  security implications (25% of merged PRs are automated dep bumps)
- input-validation: Ensure user inputs like API keys and config values
  are validated before causing downstream failures
- test-coverage: Verify new functionality includes corresponding tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: prettier formatting

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
2026-03-09 10:51:44 -07:00

1.8 KiB

name description
Error Message Quality Ensure error handling surfaces actionable messages to users

Error Message Quality Check

Review this pull request for error handling quality. The most common user-facing issues in this codebase are generic "Unknown error" messages and swallowed error details that prevent users from diagnosing problems themselves.

What to Check

  1. Catch blocks that discard error details - Look for catch blocks that re-throw or return a generic message without including the original error's message, status code, or context.

  2. HTTP status codes without user-friendly mapping - When making API calls (especially to LLM providers), ensure that common HTTP errors produce distinct, actionable messages:

    • 401 → "Invalid API key" (not "Unknown error")
    • 402 → "Insufficient funds or quota exceeded"
    • 403 → "Access denied - check your API key permissions"
    • 429 → "Rate limited - please wait and retry"
    • 5xx → "Provider service error - try again later"
  3. Silent failures - Look for empty catch blocks, caught errors that are only logged but not surfaced, or promise rejections that are swallowed.

  4. Error messages that lack context - Error messages should include what operation failed and what the user can do about it, not just the raw error string.

What NOT to Flag

  • Internal error handling between modules where errors are properly propagated up
  • Test files
  • Debug/development-only error logging
  • Errors that are intentionally caught and handled silently (with a clear code comment explaining why)

Scope

Only review files changed in this PR. Do not audit the entire codebase. If you find issues, make targeted fixes to improve the error messages in the changed code. If no error handling issues exist in the changed files, do nothing.