Enable retries on POST requests for transient errors#22
Merged
Conversation
httpx-retries excludes POST from its default retryable methods set, which means create_job, create_session, and end_session silently skip retries on 429/5xx responses. Add POST to the allowed methods so these endpoints benefit from the same retry behavior as GET/PUT/DELETE.
guenp
approved these changes
Apr 24, 2026
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
httpx-retries excludes POST from its default retryable methods set (
RETRYABLE_METHODS), which meanscreate_job,create_session, andend_session(all POST endpoints) silently skip retries on 429/5xx responses. This adds POST to the allowed methods so these endpoints benefit from the same retry behavior as GET/PUT/DELETE.The status code filter (
status_forcelist) already scopes retries to genuinely transient errors (429, 500, 502, 503, 520-529), so this is safe.Test plan
uv run pytest- all 219 tests pass, 100% coverage maintainedallowed_methodsImportant
Most code in
ionq_core/is auto-generated. Do not edit files underionq_core/api/,ionq_core/models/, orionq_core/client.py,errors.py,types.pydirectly.See CONTRIBUTING.md for details.