Errors
The host loader calls onError({code, status, kind, requestId, retryAfterSecs}) for typed refusals. A failed initial mount also rejects its promise. Do not display raw server error text or credentials.
Published access and spend codes
These codes are enforced by the delivered chat API. INSUFFICIENT_BALANCE can be an HTTP 402 or a typed error in a 200 stream; its kind is payment_required. Stream callbacks have no HTTP status. An exhausted client-owned service wallet is masked as SERVICE_TEMPORARILY_UNAVAILABLE. Console Support reaches the SUP queue; ask us about contractual response times.
Recovery
Preserve the user's draft. Honor Retry-After for limits. Never automatically retry a refused billed turn. A fresh ticket renews the same user's session; it does not reset tenant or user counters. Correct an unconfigured or unapproved origin in Integrations → Allowed sites and Publish. A retained thread must belong to that same user. On logout, destroy the widget.