Skip to content

Commit

Permalink
Handle WSServerHandshakeError (#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kane610 committed Feb 23, 2024
1 parent 7647002 commit f86cd67
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aiounifi/interfaces/connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,13 @@ async def websocket(self, callback: Callable[[bytes], None]) -> None:
err.add_note("Error connecting to UniFi websocket")
raise

except aiohttp.WSServerHandshakeError as err:
LOGGER.error(
"Server handshake error connecting to UniFi websocket: '%s'", err
)
err.add_note("Server handshake error connecting to UniFi websocket")
raise

except WebsocketError:
raise

Expand Down

0 comments on commit f86cd67

Please sign in to comment.