Skip to content

Commit

Permalink
bridge state: change 'Server disconnected' to BAD_CREDENTIALS instead…
Browse files Browse the repository at this point in the history
… of UNKNOWN_ERROR

Signed-off-by: Sumner Evans <[email protected]>
  • Loading branch information
sumnerevans committed Jul 18, 2023
1 parent 2dfc539 commit 9aeb02f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions linkedin_matrix/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import asyncio
import time

from aiohttp.client_exceptions import TooManyRedirects
from aiohttp.client_exceptions import ServerConnectionError, TooManyRedirects
from linkedin_messaging import URN, LinkedInMessaging
from linkedin_messaging.api_objects import (
Conversation,
Expand Down Expand Up @@ -199,7 +199,7 @@ async def load_session(

try:
self.user_profile_cache = await self.client.get_user_profile()
except TooManyRedirects as e:
except (TooManyRedirects, ServerConnectionError) as e:
await self.push_bridge_state(BridgeStateEvent.BAD_CREDENTIALS, message=str(e))
return False
except Exception as e:
Expand Down

0 comments on commit 9aeb02f

Please sign in to comment.