Skip to content

Commit ba29c17

Browse files
authored
fix(api): log the serial number if expected when raising ModuleNotAttachedError. (#17348)
1 parent b5f09dd commit ba29c17

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/src/opentrons/protocol_engine/state/modules.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,10 @@ def select_hardware_module_to_load( # noqa: C901
11981198
else:
11991199
return m
12001200

1201-
raise errors.ModuleNotAttachedError(f"No available {model.value} found.")
1201+
raise errors.ModuleNotAttachedError(
1202+
f"No available {model.value} with {expected_serial_number or 'any'}"
1203+
" serial found."
1204+
)
12021205

12031206
def get_heater_shaker_movement_restrictors(
12041207
self,

0 commit comments

Comments
 (0)