diff --git a/api/src/opentrons/hardware_control/backends/ot3controller.py b/api/src/opentrons/hardware_control/backends/ot3controller.py index 4dd1e814b8e..1b90e086dca 100644 --- a/api/src/opentrons/hardware_control/backends/ot3controller.py +++ b/api/src/opentrons/hardware_control/backends/ot3controller.py @@ -192,6 +192,8 @@ FirmwareUpdateRequiredError, FailedGripperPickupError, LiquidNotFoundError, + CommunicationError, + PythonException, ) from .subsystem_manager import SubsystemManager @@ -1186,7 +1188,14 @@ async def update_engaged_axes(self) -> None: async def is_motor_engaged(self, axis: Axis) -> bool: node = axis_to_node(axis) result = await get_motor_enabled(self._messenger, {node}) - engaged = result[node] + try: + engaged = result[node] + except KeyError as ke: + raise CommunicationError( + message=f"No response from {node.name} for motor engagement query", + detail={"node": node.name}, + wrapping=[PythonException(ke)], + ) from ke self._engaged_axes.update({axis: engaged}) return engaged