Skip to content

Handle transient SSL failures during GitHub token revocation#80

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

Handle transient SSL failures during GitHub token revocation#80
cursor[bot] wants to merge 1 commit intomainfrom
cursor/high-impact-sentry-errors-3de2

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor Bot commented Apr 19, 2026

Summary

  • make GitHub App installation-token revocation best-effort in GithubAppToken.get_token()
  • catch requests.RequestException when calling GitHub's token revocation endpoint and log a warning instead of failing request handling
  • add focused unit tests for both revocation failure and successful revocation flows

Root cause

A transient network/SSL failure while revoking the temporary installation token was raised from the context manager finally block. That exception replaced otherwise successful webhook processing and bubbled up as a 500.

Validation

  • python3 -m pytest tests/test_github_app.py tests/test_web_app_handler.py
  • result: 10 passed, 1 skipped

Risk

Low. The revocation call is cleanup-only and installation tokens already expire quickly. The change prevents false-negative webhook failures while preserving logging visibility for cleanup errors.

Open in Web View Automation 

Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.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