fix(uipath-platform): retry 500 responses for GET requests - #1849
Open
chandhanshanth wants to merge 1 commit into
Open
fix(uipath-platform): retry 500 responses for GET requests#1849chandhanshanth wants to merge 1 commit into
chandhanshanth wants to merge 1 commit into
Conversation
GET is idempotent, so a bare 500 can be safely retried when the request is a GET, even though it's left non-retryable for other methods since it may indicate a non-idempotent, non-transient server bug. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the UiPath Platform SDK’s retry classification so that HTTP 500 responses are treated as retryable only for idempotent GET requests (via EnrichedException), aligning retry behavior with method safety while keeping non-GET 500s non-retryable.
Changes:
- Extend
is_retryable_platform_exceptionto treat status500as retryable when the enriched request method isGET(case-insensitive). - Expand and rename retry-related tests to cover
500behavior forGETvsPOST, including lowercase method handling. - Bump
uipath-platformpackage version to0.2.18.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/uipath-platform/src/uipath/platform/common/retry.py | Adds GET-only retry classification for HTTP 500 via EnrichedException.http_method. |
| packages/uipath-platform/tests/services/test_retry.py | Updates helper to parameterize request method and adds coverage for 500 GET retryability (incl. lowercase). |
| packages/uipath-platform/pyproject.toml | Increments package version to reflect the behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET, since GET is idempotent and safe to retry regardless of whether the 500 was transient. Other methods keep treating a bare 500 as non-retryable (may reflect a non-idempotent server-side bug).uipath-platformto 0.2.18 (required by the version-availability CI check forsrc/changes).Test plan
pytest tests/services/test_retry.py— addedtest_enriched_500_get_retryable,test_enriched_500_get_lowercase_retryable, renamedtest_enriched_500_not_retryable→test_enriched_500_post_not_retryableruff check/ruff format --check/mypy src testsonuipath-platform🤖 Generated with Claude Code