wrap websocket connect attemot in try/except