SendResult or throws an error that tells you what happened. This page covers the retry rules, the idempotency guarantees, and the full error surface, including the one distinction that matters most when catching: transport failures and configuration failures are different error types.
Idempotency
If you omitidempotencyKey, the client mints one UUID per send and reuses it across every internal retry, so a flaky connection cannot produce a duplicate. That minted key protects only the retries inside that one call.
To make repeats safe across process restarts and queue redeliveries, pass your own key naming the business fact:
What retries automatically
Up to three retries follow the initial attempt (four attempts total by default). Backoff starts at
retryBaseDelayMs, uses bounded jitter, and never exceeds retryMaxDelayMs or the remaining operation deadline. Valid delta-seconds and HTTP-date Retry-After values can extend that delay. Every attempt is bounded by both attemptTimeoutMs and the remaining operationTimeoutMs budget.
Handling errors
HTTP rejections throwRepostPublishError, which carries the HTTP status, parsed bounded JSON body, and structured delivery metadata. Network, timeout, cancellation, deadline, and overload failures throw RepostTransportError:
The payload cap is checked before the first attempt, so an oversized event never reaches the network.
Validation errors are coded and name the exact path:
REQUIREDat$.idwhen a required field is absent[NULL_NOT_ALLOWED]whennullis passed for a non-nullable fieldTYPE_MISMATCH,OUT_OF_RANGE,NON_FINITE,INVALID_DATETIME,INVALID_ENUM,INVALID_JSON, andINVALID_UNICODEfor malformed values
What goes on the wire
Payloads serialize deterministically: fields in schema declaration order under their@map wire names, absent optional fields omitted (or their @default injected), explicit null only where the schema allows it, and timestamps in the ISO-8601 millisecond UTC form. Input properties that aren’t in the schema are dropped. A value you provide is never overridden by a default. The envelope has exactly the keys type, timestamp, data, in that order.
Continue
Testing
Exercise these paths without a network.
Configuration
The transport options behind the retry behavior.
Delivery & retries
What happens to the message once Repost accepts it.