Skip to content

Handle Octokit::Forbidden in GitHub solution syncer#8479

Merged
iHiD merged 1 commit into
mainfrom
fix/8470
Feb 9, 2026
Merged

Handle Octokit::Forbidden in GitHub solution syncer#8479
iHiD merged 1 commit into
mainfrom
fix/8470

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 9, 2026

Closes #8470
Closes #8472

Summary

  • Add Octokit::Forbidden to the rescue clause in CreatePullRequest, alongside existing Octokit::NotFound handling — returns nil when the integration lacks permission
  • Add Octokit::Forbidden noop rescue to all 4 sync commands (SyncIteration, SyncSolution, SyncTrack, SyncEverything) as a safety net for Forbidden errors from CreateCommit, FindOrCreateBranch, and LocalGitRepo
  • This is a permanent permission issue (not transient), so silently dropping the sync is the correct behavior — same as Octokit::NotFound and GithubApp::InstallationNotFoundError

Test plan

  • Added test for Octokit::Forbidden in CreatePullRequest (returns nil)
  • Added noop tests for Octokit::Forbidden in all 4 sync commands
  • All 38 tests in test/commands/user/github_solution_syncer/ pass

🤖 Generated with Claude Code

When a GitHub App installation loses write permissions to a user's
repository, the API returns 403 Forbidden. This was unhandled, causing
exceptions to bubble up to Sentry. Now treated as a noop since the
permission issue is permanent and retrying won't help.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit 2a513bd into main Feb 9, 2026
41 checks passed
@iHiD iHiD deleted the fix/8470 branch February 9, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment