Skip to content

Commit

Permalink
tweak messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdavb committed Feb 2, 2025
1 parent a7b4640 commit 7948296
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/evohomeasync/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def _fetch_session_id(self, credentials: dict[str, str]) -> None:

except (KeyError, TypeError) as err:
raise exc.AuthenticationFailedError(
f"Authenticator response is invalid: {err!r}, payload={response}"
f"Authenticator response is invalid: {response}: {err.__class__.__name__}: {err}"
) from err

self._was_authenticated = True # i.e. the credentials are valid
Expand Down
2 changes: 1 addition & 1 deletion src/evohomeasync/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async def _get_config(self) -> list[EvoTcsInfoDictT]:
user_id = self._user_info["user_id"]
except (KeyError, TypeError) as err:
raise exc.BadApiResponseError(
f"User info is invalid: {err!r}, user_info={self._user_info}"
f"No user_id in user_info dict. Received: {self._user_info}"
) from err

self._user_locs = await self.auth.get(
Expand Down
2 changes: 1 addition & 1 deletion src/evohomeasync2/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ async def _fetch_access_token(self, credentials: dict[str, str]) -> None:

except (KeyError, TypeError) as err:
raise exc.AuthenticationFailedError(
f"Authenticator response is invalid: {err!r}, payload={response}"
f"Authenticator response is invalid: {response}: {err.__class__.__name__}: {err}"
) from err

self._was_authenticated = True # i.e. the credentials are valid
Expand Down
2 changes: 1 addition & 1 deletion src/evohomeasync2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async def _get_config(
user_id = self._user_info[SZ_USER_ID]
except (KeyError, TypeError) as err:
raise exc.BadApiResponseError(
f"User info is invalid: {err!r}, user_info={self._user_info}"
f"No user_id in user_info dict. Received: {self._user_info}"
) from err

self._user_locs = await self.auth.get(
Expand Down

0 comments on commit 7948296

Please sign in to comment.