Skip to content

Retry GitHub solution sync on transient server errors#8468

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

Retry GitHub solution sync on transient server errors#8468
iHiD merged 1 commit into
mainfrom
fix/8457

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 9, 2026

Closes #8457

Summary

  • Rescue Octokit::ServerError (parent of BadGateway, InternalServerError, ServiceUnavailable) in all four GitHub solution sync commands (SyncSolution, SyncIteration, SyncTrack, SyncEverything)
  • On a transient 5xx error from GitHub's API, requeue the job to retry after 30 seconds using the existing requeue_job! pattern
  • Added tests for each sync command verifying the requeue behavior

Test plan

  • All 33 tests in test/commands/user/github_solution_syncer/ pass
  • New tests verify requeue_job! is called with 30 seconds on Octokit::ServerError
  • Pre-commit hooks pass (rubocop, prettier)

🤖 Generated with Claude Code

Rescue Octokit::ServerError (covers BadGateway, InternalServerError,
ServiceUnavailable) in the sync commands and requeue the job after 30
seconds, matching the existing requeue pattern used for Discord rate
limits.

Closes #8457

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit d7b6bc0 into main Feb 9, 2026
41 checks passed
@iHiD iHiD deleted the fix/8457 branch February 9, 2026 11:03
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.

Octokit::BadGateway: POST https://api.github.com/repos/MarvsConcept/Exercism/pulls: 502 - Server Error (Octokit::BadGateway)

1 participant