Skip to content

Improve error handling in GitHub client with better error messages #7

@Hell1213

Description

@Hell1213

Issue Description

The GitHub client (oss/github.py) should provide more helpful error messages when API calls fail. Currently, some error messages may be too generic or not actionable.

Current Behavior

When GitHub API calls fail, the error messages might not clearly indicate:

  • What operation failed
  • Why it failed (authentication, rate limit, network, etc.)
  • How to fix the issue
  • What the user should do next

Expected Behavior

Error messages should:

  1. Clearly state what operation failed (e.g., "Failed to fetch issue #123")
  2. Indicate the type of error (authentication, rate limit, not found, network, etc.)
  3. Provide actionable guidance (e.g., "Check your GitHub token" or "Rate limit exceeded, wait 60 seconds")
  4. Include relevant context (issue number, PR number, etc.)

Files to Modify

  • oss/github.py - Improve error handling and messages in:
    • fetch_issue()
    • create_pr()
    • get_pr_status()
    • Other API methods

Acceptance Criteria

  • Error messages clearly state what operation failed
  • Error messages indicate error type (auth, rate limit, not found, etc.)
  • Error messages provide actionable guidance
  • Error messages include relevant context
  • Error handling is tested

Testing

  1. Test with invalid GitHub token
  2. Test with rate limit scenario
  3. Test with non-existent issue/PR
  4. Test with network errors
  5. Verify error messages are helpful

Priority

Medium - Improves user experience when GitHub API calls fail

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