Skip to content

Handle GitHub metadata timeouts gracefully#114

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/sentry-error-investigation-f2b9
Draft

Handle GitHub metadata timeouts gracefully#114
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/sentry-error-investigation-f2b9

Conversation

@cursor

@cursor cursor Bot commented May 21, 2026

Copy link
Copy Markdown

Summary

  • Add an explicit timeout to GitHub API metadata fetches.
  • Treat GitHub metadata Timeout errors as non-fatal and fall back to webhook/run data when building a trace.
  • Add unit coverage for run metadata and workflow metadata timeout paths.

Validation

  • python3 -m pytest tests/test_github_sdk.py
  • python3 -m pytest
  • python3 -m pre_commit run --all-files

Sentry

Addresses https://sentry.sentry.io/issues/7293949142/ (SENTRY-GITHUB-ACTIONS-APP-6T).

Open in Web View Automation 

Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
Comment thread src/github_sdk.py
headers = {"Authorization": f"token {self.token}"}

req = requests.get(url, headers=headers)
req = requests.get(url, headers=headers, timeout=GITHUB_API_TIMEOUT)
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