Skip to content

Commit e6fc646

Browse files
committed
fix: catch broad exception
1 parent 5db7ae4 commit e6fc646

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

roborock/devices/b01_channel.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ def find_response(response_message: RoborockMessage) -> None:
6969
_LOGGER.debug("Sending MQTT message: %s", roborock_message)
7070
try:
7171
await mqtt_channel.publish(roborock_message)
72-
try:
73-
return await asyncio.wait_for(future, timeout=_TIMEOUT)
74-
except TimeoutError as ex:
75-
raise RoborockException(f"Command timed out after {_TIMEOUT}s") from ex
72+
return await asyncio.wait_for(future, timeout=_TIMEOUT)
73+
except TimeoutError as ex:
74+
raise RoborockException(f"Command timed out after {_TIMEOUT}s") from ex
75+
except Exception as ex:
76+
_LOGGER.exception("Error sending decoded command: %s", ex)
77+
raise
7678
finally:
7779
unsub()

0 commit comments

Comments
 (0)