Better error handling, reporting and redesigned WebSocketHandler