Skip to content

Commit

Permalink
fix(api): Ensure appropriate error is raised for mismatching tip type…
Browse files Browse the repository at this point in the history
… and pipette type (#15918)

Covers RQA-2840
Updates the error message to display more helpful/appropriate information regarding pipette data instead of liquid class data
  • Loading branch information
CaseyBatten authored Aug 13, 2024
1 parent 5c2cea5 commit 7e7f7dc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions api/src/opentrons/hardware_control/instruments/ot3/pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
InvalidLiquidClassName,
CommandPreconditionViolated,
PythonException,
InvalidInstrumentData,
)
from opentrons_shared_data.pipette.ul_per_mm import (
piecewise_volume_conversion,
Expand Down Expand Up @@ -652,12 +653,8 @@ def set_tip_type(self, tip_type: pip_types.PipetteTipType) -> None:
try:
new_tips = self._liquid_class.supported_tips[tip_type]
except KeyError as e:
raise InvalidLiquidClassName(
message=f"There is no configuration for {tip_type.name} in liquid class {str(self._liquid_class_name)} on a {self._config.display_name}",
detail={
"current-liquid-class": str(self._liquid_class_name),
"requested-type": tip_type.name,
},
raise InvalidInstrumentData(
message=f"There is no configuration for {tip_type.name} in the pick up tip configurations for a {self._config.display_name}",
wrapping=[PythonException(e)],
) from e

Expand Down

0 comments on commit 7e7f7dc

Please sign in to comment.