Missing error handling in WebSockets code