Errors
The API answers errors asapplication/problem+json. The SDK throws them as RewindApiError; test their kind with
isProblem.
Two more errors come from the SDK itself:
NamespaceRequiredError: a key’s client started a run, or checked or tested a script, without naming the end user (rewind.namespace(name)).RewindConnectionError: the server could not be reached.
RewindError.
Retries
A request that is safe to repeat is sent again after a network error or a 503, twice by default (maxRetries): reads,
PUT, DELETE, toolset registration and workflow saves (both content-addressed), checks and tests, and every request
that carries an idempotency key.
Starting a run, forking it or sending a signal without an idempotency key is never repeated, nor is minting a
token. Give them a key, and they become safe to retry:
Waiting
runs.start, runs.get, runs.fork and runs.cancel take wait: they answer when the run ends or wait passes,
whichever comes first. A wait longer than 50 seconds is split into several requests, so proxies and HTTP timeouts never
cut it. Every call also takes an AbortSignal as signal.
The event stream (runs.events(id, { follow: true })) reconnects after a dropped connection, from the next entry, up
to 5 times by default (maxReconnects).