Skip to content

Commit

Permalink
Raise exception if we have no token after initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Dec 14, 2024
1 parent d814211 commit 31bdf6a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/polestar_api/pypolestar/polestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ async def async_init(self, verbose: bool = False) -> None:
await self.auth.get_token()

if self.auth.access_token is None:
self.logger.warning("No access token for %s", self.username)
return
raise PolestarAuthException(f"No access token for {self.username}")

self.gql_session = await get_gql_session(self.gql_client)

Expand Down

0 comments on commit 31bdf6a

Please sign in to comment.