Skip to content

feat(http): also retry on transient status code 520#337

Merged
dorsha merged 1 commit into
mainfrom
feat/retry-520
Jun 22, 2026
Merged

feat(http): also retry on transient status code 520#337
dorsha merged 1 commit into
mainfrom
feat/retry-520

Conversation

@dorsha

@dorsha dorsha commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary

Add Cloudflare status code 520 ("Web Server Returned an Unknown Error") to the HTTP client's retryable status codes, alongside the existing 503 / 521 / 522 / 524 / 530.

Like the other Cloudflare 52x codes already retried, 520 is a transient edge error returned when the origin is briefly unreachable (e.g. during pod replacement on deploy), so the request is safe to retry. Follow-up to #302; brings this SDK in line with go-sdk (descope/go-sdk#775), python-sdk (descope/python-sdk#1581) and core-js-sdk (descope/descope-js#1423).

https://github.com/descope/etc/issues/14039

Test plan

  • Added 520 to the retryable-status-codes test/data set, mirroring the existing per-code coverage
  • CI runs the full suite

🤖 Generated with Claude Code

Add Cloudflare status code 520 ("Web Server Returned an Unknown Error")
to the HTTP client's retryable status codes, alongside the existing
503/521/522/524/530.

Brings this SDK in line with the go-sdk and python-sdk. Relates to
descope/etc#14039

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shuni-bot-dev

shuni-bot-dev Bot commented Jun 22, 2026

Copy link
Copy Markdown

🐕 Review complete — View session on Shuni Portal 🐾

@shuni-bot-dev

shuni-bot-dev Bot commented Jun 22, 2026

Copy link
Copy Markdown

🐕 Suggested Reviewers

The review assignment prioritizes recent contributors active in the changed files, diversifying the reviewers to cover different parts of the implementation. This approach leverages recent modifications and subjects the changes to knowledgeable eyes.

Reviewer Reason
slavikm Recently made multiple commits to src/main/java/com/descope/proxy/impl/AbstractProxyImpl.java, indicating deep familiarity with the core implementation.
yosiharan Contributed a commit to the same file, suggesting recent active engagement and understanding of the current logic.
orius123 Made a contribution to src/main/java/com/descope/proxy/impl/AbstractProxyImpl.java, adding to their familiarity with this part of the codebase.
aviadl Added a commit to src/main/java/com/descope/proxy/impl/AbstractProxyImpl.java, providing additional review coverage for the implementation.

Suggested by Shuni based on git history and PR context. Names are not @-mentioned to avoid notifying anyone — request a review from whoever fits best.

@shuni-bot-dev shuni-bot-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐕 Shuni's Review

Adds Cloudflare status 520 to the HTTP client's retryable codes, with matching comment and test updates.

No issues found — good bones! Clean, consistent with the existing 52x codes; tests cover membership, the size count (5→6), and the retry loop. Woof!

@dorsha dorsha merged commit 57a26b0 into main Jun 22, 2026
18 checks passed
@dorsha dorsha deleted the feat/retry-520 branch June 22, 2026 16:15
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