Skip to content

Commit

Permalink
refactor: Remove serial from exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrapan committed Dec 10, 2024
1 parent c547509 commit ae0da32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/solarman/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ async def get(self, runtime = 0, requests = None):
self.state_updated = now
self.state = 1

except TimeoutError:
except TimeoutError as e:
if await self.get_failed():
raise
_LOGGER.debug(f"[{self.config.serial}] Timeout fetching {self.config.name} data")
_LOGGER.debug(f"[{self.config.serial}] Timeout fetching {self.config.name} data: {e}")
except Exception as e:
if await self.get_failed():
raise Exception(f"[{self.config.serial}] {format_exception(e)}") from e
raise
_LOGGER.debug(f"[{self.config.serial}] Error fetching {self.config.name} data: {e}")

return result
Expand Down

0 comments on commit ae0da32

Please sign in to comment.