Skip to content

Add tests for callClaude error handling paths #66

@philoserf

Description

@philoserf

Priority: MEDIUM

Finding: callClaude catches specific Anthropic error types (AuthenticationError, RateLimitError, InternalServerError, generic APIError) and shows user-friendly notices. These error paths are only verified by code inspection, not by tests.

Location: src/utils.ts (callClaude), src/utils.test.ts

Recommendation: Write tests that mock the Anthropic SDK to throw each error type and verify:

  • The correct Notice message is shown
  • The error is re-thrown for higher-level handling

Source: Guidelines advisor assessment — Testing & Verification

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions