Skip to content

Commit

Permalink
fix: improved logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja authored Aug 15, 2024
1 parent 87cbbf2 commit 11c3a3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions custom_components/kia_uvo/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,16 @@ async def _async_update_data(self):
)
except Exception as err:
try:
_LOGGER.exception(
f"Force update failed, falling back to cached: {traceback.format_exc()}"
)
await self.hass.async_add_executor_job(
self.vehicle_manager.update_all_vehicles_with_cached_state
)
except Exception as err_nested:
_LOGGER.exception(
f"Force update failed, falling back to cached: {traceback.format_exc()}"
f"Cached update failed: {traceback.format_exc()}"
)
except Exception as err_nested:
raise UpdateFailed(
f"Error communicating with API: {traceback.format_exc()}"
)
Expand Down

0 comments on commit 11c3a3b

Please sign in to comment.