Handle WebSocketServer errors

resolves #27