What it means
You sent the WebSocket a message whosetype 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 oftype, and send only the types the WebSocket reference lists.