Errors And Retries
Last updated 2026-02-13
The SDK throws RooaakError for non-2xx responses.
RooaakError includes:
codestatusdetails
Retry behavior
Retries use exponential backoff with jitter and apply to retryable HTTP statuses (429, 5xx) only when the request is safe to retry.
Safe to retry:
GETrequests (idempotent)POSTrequests where you provide an idempotency key
Not safe to retry automatically:
POSTrequests without idempotency keys (could create duplicates)
Practical guidance
- Always set an idempotency key for
messages.send(...)if your infrastructure might retry requests. - If you build your own retry wrapper around
agents.start(...), prefer pollingagents.get(...)forstatus === "running"rather than retrying rapidly.