client: Handle client errors while confirming the auth string.

This commit is contained in:
Damir Jelić 2019-05-09 10:54:01 +02:00
parent de29df75b9
commit 1f548f3a7e

View File

@ -2,6 +2,7 @@ import asyncio
from pprint import pformat
from typing import Any, Dict, Optional
from aiohttp.client_exceptions import ClientConnectionError
from nio import (AsyncClient, ClientConfig, EncryptionError,
KeysQueryResponse, MegolmEvent,
RoomEncryptedEvent, SyncResponse,
@ -192,7 +193,10 @@ class PanClient(AsyncClient):
self.send_info("No such verification process found.")
return
await self.confirm_short_auth_string(sas.transaction_id)
try:
await self.confirm_short_auth_string(sas.transaction_id)
except ClientConnectionError as e:
await self.send_info(f"Error confirming short auth string: {e}")
device = sas.other_olm_device
if sas.verified: