Skip to content

Commit

Permalink
Print host when handling request or timeout error (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
DCSBL authored Aug 10, 2024
1 parent 3a479fd commit 92b2ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homewizard_energy/homewizard_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ async def request(
_LOGGER.debug("%s, %s", resp.status, await resp.text("utf-8"))
except asyncio.TimeoutError as exception:
raise RequestError(
"Timeout occurred while connecting to the HomeWizard Energy device"
f"Timeout occurred while connecting to the HomeWizard Energy device at {self.host}"
) from exception
except (ClientError, ClientResponseError) as exception:
raise RequestError(
"Error occurred while communicating with the HomeWizard Energy device"
f"Error occurred while communicating with the HomeWizard Energy device at {self.host}"
) from exception

if resp.status == HTTPStatus.FORBIDDEN:
Expand Down

0 comments on commit 92b2ab1

Please sign in to comment.