Skip to content

Error Handling Patterns with GitHub Copilot

Prompt 1: Implementing Robust Error Handling

Use Case: To help developers implement comprehensive error handling using GitHub Copilot.

Prompt: Provide clear guidance for error handling implementation:
- Error types and hierarchies
- Recovery strategies
- Logging patterns
- User feedback

Anti-patterns to Avoid

  1. Error Handling
  2. Catching all errors blindly
  3. Swallowing errors
  4. Missing error context
  5. Inconsistent error formats

  6. Error Recovery

  7. Infinite retry loops
  8. Missing timeout handling
  9. Unclear error states
  10. Incomplete rollback