Skip to content

WebSocketFrameErrorCode

WebSocketFrameErrorCode = 1002 | 1007 | 1009

Defined in: packages/format-websocket/src/errors.ts:10

Why a frame cannot be accepted, as the close code the endpoint must then fail the connection with (RFC 6455 §7.4.1).

  • 1002 — protocol error: malformed or illegal framing.
  • 1007 — a close reason (or, at the message layer, a text message) that is not UTF-8.
  • 1009 — a payload larger than the limit.