Skip to content

Commit

Permalink
raise error exception on polestarApi
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyuentuen committed Jan 3, 2024
1 parent b30ce69 commit 6e4c184
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/polestar_api/pypolestar/polestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ async def get_graph_ql(self, params: dict):
error_message = resultData['errors'][0]['message']
if error_message == "User not authenticated":
raise PolestarNotAuthorizedException("Unauthorized Exception")
_LOGGER.error(error_message)
_LOGGER.error(resultData.get('errors'))
raise PolestarApiException(error_message)

_LOGGER.debug(resultData)
return resultData

0 comments on commit 6e4c184

Please sign in to comment.