Skip to content

Raise specific errors after upstream retries exhausted#8617

Merged
iHiD merged 1 commit into
mainfrom
fix/8588
Feb 12, 2026
Merged

Raise specific errors after upstream retries exhausted#8617
iHiD merged 1 commit into
mainfrom
fix/8588

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 12, 2026

Closes #8588

Summary

  • Added SnippetGeneratorTemporarilyUnavailable error to Iteration::GenerateSnippet and LocCounterTemporarilyUnavailable error to Iteration::CountLinesOfCode
  • After exhausting 3 retries on 502/503/504 responses, these named errors are raised instead of the raw RestClient exceptions
  • This gives each failure a distinct identity in Sentry so they can be manually ignored unless they escalate

Test plan

  • Updated existing "raises after max retries exhausted" tests to expect the new error classes
  • All 20 tests pass for both commands

🤖 Generated with Claude Code

… commands

Instead of re-raising the raw RestClient exception after max retries,
raise named errors (SnippetGeneratorTemporarilyUnavailable and
LocCounterTemporarilyUnavailable) so they can be identified and
managed in Sentry independently.

Closes #8588

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit 0506c0d into main Feb 12, 2026
41 checks passed
@iHiD iHiD deleted the fix/8588 branch February 12, 2026 17:45
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.

RestClient::BadGateway: 502 Bad Gateway (RestClient::BadGateway)

1 participant