Skip to content

Improve Error Handling with Specific Error Messages #10

@AndreaGriffiths11

Description

@AndreaGriffiths11

Description

Enhance error handling throughout the extension to provide more specific, actionable error messages for different failure scenarios.

Acceptance Criteria

  • Create custom error classes for different failure types
  • Improve error messages in gatherRepositoryData() method
  • Add retry logic for transient failures
  • Show contextual help links in error messages
  • Log detailed diagnostics to output channel
  • Add error telemetry (opt-in)

Error Categories to Handle

  • Network/API failures
  • Authentication issues
  • Rate limiting
  • Invalid repository state
  • MCP service unavailable
  • AI service errors

Technical Notes

  • Extend existing ErrorHandler utility
  • Use discriminated unions for error types
  • Follow VS Code error message conventions
  • Preserve stack traces for debugging

Files to Modify/Create

  • src/utils/error-handler.ts - Extend with custom errors
  • src/core/copilot-mcp-service.ts - Improve error handling
  • src/core/expertise-analyzer.ts - Add specific error cases

Demo Value

Demonstrates Copilot coding agent's ability to:

  • Improve code quality
  • Implement defensive programming
  • Create type-safe error handling
  • Follow best practices

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions