Skip to main content

What it means

You sent the WebSocket a message whose type it doesn’t know. It knows authenticate, subscribe, unsubscribe and ping. The connection stays open. Before authenticated, any message but authenticate closes the connection with 4001 instead. A message type the server adds later gets this answer from a server that doesn’t have it yet, so your code can tell what the server supports.

What to do

Check the spelling of type, and send only the types the WebSocket reference lists.

Example