Skip to content

feat: request retries - #155

Open
kewynakshlley wants to merge 7 commits into
mainfrom
feat/request-retries
Open

kewynakshlley wants to merge 7 commits into
mainfrom
feat/request-retries

Conversation

@kewynakshlley

Copy link
Copy Markdown
Collaborator

Summary

  • RequestOptions: new maxRetries(int). It rejects negatives, and when unset the request inherits the client's default.
  • HttpClient: new constructor HttpClient(OkHttpClient, String, int maxRetries) and a getMaxRetries() getter. execute now runs an attempt loop, and the per-request timeout applies to each attempt. The
    two-argument constructor still means no retries.
  • Resend.Builder: new maxRetries(int). Like the timeouts, it can't be combined with httpClient(...), and the error message and javadocs say so.
  • README: a new "Retries and timeouts" section. It also documents the per-request timeout from PR 1, which wasn't in the README yet.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread README.md Outdated
Comment thread src/test/java/com/resend/core/net/impl/HttpClientRetryTest.java Outdated
Comment thread src/main/java/com/resend/core/net/impl/HttpClient.java Outdated
Comment thread src/main/java/com/resend/core/net/impl/HttpClient.java
Comment thread src/main/java/com/resend/core/net/impl/HttpClient.java Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 5 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Adds opt-in request retries and per-request timeouts to the HTTP client, plus builder/API plumbing and docs. Needs human sign-off on the dismissed blocking-wait tradeoff: retries block the calling thread and Retry-After is capped at 30s per attempt.

View guided diff | Re-trigger cubic

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.

1 participant