{"error": {"code", "message"}} with a matching HTTP status. The message says what to fix.
Retry-After header, in seconds. Wait that long, then send the same request again: for a page, with the same cursor.
A cursor that keeps failing (a 400, or a 502 again and again) while the first page loads will not heal: start the walk again from the first page. See Pagination.
Live errors
On the WebSocket, a wrong subscribe or op answers a frame of typeerror, with the id of the subscription:
A channel that cannot load its first data (for example a
token channel on an unknown token) sends an error frame with the same code the REST route would give.
On SSE, wrong parameters answer 400 JSON before the stream starts.
While the server is at capacity, it refuses new connections, before the WebSocket upgrade or before the SSE stream starts, with 503 and Retry-After: 30:
WebSocket cannot read the status: it only sees the connection fail. An EventSource does not retry a 503 on its own. Reconnect after 30 s, with backoff.