Skip to content

Add timeout and connection error handling to GitHubClient#42

Open
markpolyak wants to merge 1 commit intomainfrom
claude/mystifying-gauss
Open

Add timeout and connection error handling to GitHubClient#42
markpolyak wants to merge 1 commit intomainfrom
claude/mystifying-gauss

Conversation

@markpolyak
Copy link
Copy Markdown
Owner

Changes

  • Add DEFAULT_TIMEOUT constant (30s) to GitHubClient
  • Apply timeout to all requests.get() calls in API methods
  • Add try-catch error handling in get_job_logs() to gracefully handle RequestException
  • Add comprehensive unit tests for get_job_logs() covering success, HTTP errors, and connection errors

Why

Improves reliability by preventing indefinite hangs on network issues and providing graceful degradation instead of raising exceptions.

Add DEFAULT_TIMEOUT=30s to all GitHub API requests to prevent
indefinite hangs on network issues. Wrap get_job_logs in
try/except RequestException so transient network errors return
None instead of propagating a 500 to the user.

Add tests for get_job_logs: success, HTTP 404, and ConnectionError cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant