Skip to content

Commit

Permalink
Cleanup exception logging in Idasen Desk (#102617)
Browse files Browse the repository at this point in the history
* Cleaup exception logging in Idasen Desk

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

* Re-add trace

* Remove uneeded exc_info

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
  • Loading branch information
abmantis and bdraco committed Oct 26, 2023
1 parent 3b2a849 commit 6b5f2a1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions homeassistant/components/idasen_desk/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ async def async_step_user(
desk = Desk(None, monitor_height=False)
try:
await desk.connect(discovery_info.device, auto_reconnect=False)
except AuthFailedError as err:
_LOGGER.exception("AuthFailedError", exc_info=err)
except AuthFailedError:
errors["base"] = "auth_failed"
except TimeoutError as err:
_LOGGER.exception("TimeoutError", exc_info=err)
except TimeoutError:
errors["base"] = "cannot_connect"
except BleakError as err:
_LOGGER.exception("BleakError", exc_info=err)
except BleakError:
_LOGGER.exception("Unexpected Bluetooth error")
errors["base"] = "cannot_connect"
except Exception: # pylint: disable=broad-except
_LOGGER.exception("Unexpected error")
Expand Down

0 comments on commit 6b5f2a1

Please sign in to comment.