Decorators
Retry
Retry failed sends with configurable backoff on any channel transport.
Retry failed sends with configurable backoff. Works with email, SMS, WhatsApp, and push transports.
The one rule
Authentication errors are not retried.
Configuration
maxAttempts defaults to 3 and must be an integer ≥ 1. maxDelay caps backoff at 60 seconds. BAD_REQUEST, INVALID_CONFIG, and SMTP_AUTH_FAILED are not retried.
Quick start
import { RetryTransport } from "sently/transports/retry";
import { TaqnyatSmsTransport } from "sently/transports/taqnyat-sms";
const transport = new RetryTransport(
new TaqnyatSmsTransport({ bearerToken: "...", sender: "MyBrand" }),
{ maxAttempts: 3 },
);import { createSmsSender } from "sently/sms";
const sms = createSmsSender({ transport });Troubleshooting
No. It delegates sends to the wrapped transport.