Skip to content

Handle GitHub API metadata timeouts gracefully#85

Draft
cursor[bot] wants to merge 1 commit intomainfrom
cursor/high-impact-sentry-errors-6738
Draft

Handle GitHub API metadata timeouts gracefully#85
cursor[bot] wants to merge 1 commit intomainfrom
cursor/high-impact-sentry-errors-6738

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 19, 2026

Summary

  • add an explicit timeout to GitHub metadata fetches in GithubClient._fetch_github
  • handle requests.exceptions.Timeout in GithubClient.send_trace by skipping the trace instead of failing the webhook request
  • add unit tests for timeout propagation and graceful timeout handling

Validation

  • python3 -m pytest tests/test_github_sdk.py -q

Context

Fixes recurring ConnectTimeout failures reported in Sentry issue SENTRY-GITHUB-ACTIONS-APP-6S.

Open in Web View Automation 

Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
Comment thread src/github_sdk.py
Comment on lines +46 to +50
req = requests.get(
url,
headers=headers,
timeout=self.github_api_timeout_seconds,
)
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.

2 participants