Errors and limits

Every failure arrives as a JSON error frame with a stable code, so you know which to fix and which to retry.

Explanation

Reports every failure as a JSON error frame with a stable code, followed by a WebSocket close, so you can branch on it. Use it to decide which failures to fix, such as an invalid key, and which to retry after a short backoff, such as a server restart or a busy replay.

RECV{"type": "error"}Get access

Response

Frame you receive

application/json

These are the fields you can build against. Nested names use dot notation; optional sections are called out in their descriptions.

typestring

Always error.

Example: error

codestring

A stable machine-readable code.

Example: cursor_expired

messagestring

Human-readable explanation. Do not parse it.

Example: the requested position is older than the replay window; resume with latest

Errors and close codes

WebSocket
TEXTA JSON text frame, shown in the response example.
1008unauthorized — The key is invalid, revoked or expired, or authorization ended. Do not retry.
1000firehose_access_pending — The key is valid but not yet approved. Reconnect once access is approved.
1000forbidden — This key cannot resume from a cursor or time, or its access changed. Use latest.
1008bad_request — A frame, filter, fields entry or resume value was invalid. The message says which.
1000too_many_connections — The key already has 4 active subscriptions.
1000auth_unavailable — Authentication is busy or unreachable. Retry with backoff.
1000cursor_expired — The cursor or time is older than the 24-hour replay window. Resume with latest.
1000replay_busy — Replay capacity stayed full for 30 seconds. Retry with the same cursor.
1000slow_consumer — Your client did not read frames within 30 seconds. Reconnect with your cursor.
1000superseded — Another socket opened the same subscription name with the same key. Use a distinct name for each independent connection.
1000timeout — You did not authenticate or subscribe in time.
1001server_shutdown — The server is restarting. Reconnect with your cursor.
1011internal — Unexpected server error. Reconnect with your cursor.