Skip to content

Handle transient GitHub API connection resets#104

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

Handle transient GitHub API connection resets#104
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/sentry-error-investigation-c9fa

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented May 8, 2026

Summary

  • add a shared GitHub request helper with timeouts and one retry for transient connection/timeout failures
  • make GitHub App token revocation best-effort so cleanup failures do not mask the primary handler exception
  • add regression coverage for retrying GitHub GETs and preserving the original exception when token revocation fails

Verification

  • python3 -m pytest

Fixes SENTRY-GITHUB-ACTIONS-APP-7A

Open in Web View Automation 

Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
Comment thread src/github_http.py

for attempt in range(1, max_attempts + 1):
try:
return requests.request(method, url, **kwargs)
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