Skip to content

Commit

Permalink
fix(api): log the serial number if expected when raising ModuleNotAtt…
Browse files Browse the repository at this point in the history
…achedError.
  • Loading branch information
vegano1 committed Jan 26, 2025
1 parent 14f956d commit f4782b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/opentrons/protocol_engine/state/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,10 @@ def select_hardware_module_to_load( # noqa: C901
else:
return m

raise errors.ModuleNotAttachedError(f"No available {model.value} found.")
raise errors.ModuleNotAttachedError(
f"No available {model.value} with {expected_serial_number or 'any'}"
" serial found."
)

def get_heater_shaker_movement_restrictors(
self,
Expand Down

0 comments on commit f4782b7

Please sign in to comment.