Skip to content

feat: add opt-in send retries - #83

Open
Muneerali199 wants to merge 1 commit into
AOSSIE-Org:mainfrom
Muneerali199:fix/82-retry-send
Open

Muneerali199 wants to merge 1 commit into
AOSSIE-Org:mainfrom
Muneerali199:fix/82-retry-send

Conversation

@Muneerali199

Copy link
Copy Markdown

Summary

Adds retrySend?: boolean to ClientOptions (default false). When enabled, send() (POST) uses the client's existing retries and exponential backoff for 5xx and network/timeout errors. 401, 413, 429 and other 4xx responses still fail immediately.

The default stays non-retrying because pre-1.0 servers may not deduplicate identical messages.

Tests

  • npm test — 36 passed, including new cases for 503 retry, timeout retry, no retry on 401/413/429, and default-off behavior
  • npm run lint — passed
  • npm run build — passed (ESM, CJS, and declarations)

npm run format:check fails on both this branch and current main due a pre-existing Prettier config mismatch, and is not part of CI.

Closes #82.

AI assistance was used to implement and verify the change; I reviewed the full diff locally.

Add retrySend client option so send() can use the existing retry/backoff policy for 5xx and network errors while keeping the default non-retry behavior and fast failure for 4xx responses.

Signed-off-by: Muneerali199 <alimuneerali245@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added documentation Changes to documentation files enhancement New feature or request javascript JavaScript/TypeScript code changes tests Test file changes size/M Medium PR (51-200 lines changed) first-time-contributor First PR of an external contributor needs-review labels Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor
Messages
📖

⚠️ PR Template Check

These are non-blocking, but please fix:

  • PR description is missing required sections:
  • ### Addressed Issues:
  • ## Checklist

Please follow the PR template.

  • Some required checklist items are not completed:

  • My PR addresses a single issue

  • My code follows the project's code style

  • My changes generate no new warnings or errors

Generated by 🚫 dangerJS against ae309a0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Changes to documentation files enhancement New feature or request first-time-contributor First PR of an external contributor javascript JavaScript/TypeScript code changes needs-review size/M Medium PR (51-200 lines changed) tests Test file changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Opt-in retry for send()

1 participant