mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-01-19 02:50:44 +00:00
Add log for empty token
This commit is contained in:
parent
3ec0f5a006
commit
b04c601ad6
|
@ -228,7 +228,10 @@ class HonAuth:
|
||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
await self._error_logger(response)
|
await self._error_logger(response)
|
||||||
return False
|
return False
|
||||||
self._cognito_token = json_data["cognitoUser"]["Token"]
|
self._cognito_token = json_data.get("cognitoUser", {}).get("Token", "")
|
||||||
|
if not self._cognito_token:
|
||||||
|
_LOGGER.error(json_data)
|
||||||
|
raise exceptions.HonAuthenticationError()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
async def authenticate(self) -> None:
|
async def authenticate(self) -> None:
|
||||||
|
|
Loading…
Reference in a new issue