state.error (and from a failed message’s status): each error has a stable code, a message, a retryable flag, retryAfterSeconds and retryAt (epoch milliseconds) for waits, and, for an origin rejection, the rejected origin. ChatErrorCode is exported from the core entry.
Retried means the SDK retries by itself; you do not need to.
The SDK also returns
{ ok: false, reason } from send() without an error code; see Methods and outcomes.