Skip to content

Registries

Receivers MUST treat an unknown close code as INTERNAL, an unknown call status code as UNKNOWN (2), and an unknown unsubscribe reason as 2 (resubscribe required), so that codes added later do not break older receivers.

Used by REJECT, GOAWAY and CLOSE. On WebSocket, the close code is 4000 + code.

Code Name Meaning
0 NORMAL Normal closure
1 PROTOCOL_ERROR Malformed or disallowed frame
2 UNSUPPORTED_VERSION No common protocol version or codec
3 UNAUTHENTICATED Missing, invalid or expired credentials
4 FORBIDDEN Authenticated but not allowed
5 IDLE_TIMEOUT Nothing received for idle ms
6 SLOW_CONSUMER Outbound queue full too long
7 GOING_AWAY Server draining
8 INTERNAL Unexpected server failure
9 FRAME_TOO_LARGE Frame exceeds max_frame
10 LIMIT_EXCEEDED Server capacity or a session limit exceeded
11 RESUME_FAILED Resumption not possible
12 HANDSHAKE_TIMEOUT Handshake not completed in time (§7.1)
13 CONTRACT_MISMATCH Strict contract policy rejected the client

Used by ERROR, REQUEST_ERROR and AUTH_RESULT. Values and meanings follow gRPC status codes so that tooling and intuition transfer.

Code Name Typical use
0 OK Success (never in ERROR)
1 CANCELLED Caller cancelled
2 UNKNOWN Unknown error
3 INVALID_ARGUMENT Bad arguments, shape mismatch, invalid channel name
4 DEADLINE_EXCEEDED Deadline expired
5 NOT_FOUND Application-level “not found”
6 ALREADY_EXISTS Duplicate subscription, application conflicts
7 PERMISSION_DENIED Authorization failed
8 RESOURCE_EXHAUSTED Limits (concurrency, subscriptions, sizes)
9 FAILED_PRECONDITION Application precondition not met
10 ABORTED Concurrency conflict
11 OUT_OF_RANGE Application range errors
12 UNIMPLEMENTED Unknown method
13 INTERNAL Unexpected failure
14 UNAVAILABLE Draining server, transport loss
15 DATA_LOSS Unrecoverable data loss
16 UNAUTHENTICATED Session has no valid credentials for this operation

0 normal, 1 permission revoked, 2 resubscribe required, 3 channel closed.

0 snapshot, 1 join, 2 leave, 3 update.


From the specification: §15.1, §15.2, §15.3, §15.4.