-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api, shared-data): raise error when using gripper in ot2 protocols #13208
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -684,7 +684,9 @@ def __init__( | |
wrapping: Optional[Sequence[EnumeratedError]] = None, | ||
) -> None: | ||
"""Build a HardwareNotSupportedError.""" | ||
super().__init__(ErrorCodes.GENERAL_ERROR, message, details, wrapping) | ||
super().__init__( | ||
ErrorCodes.NOT_SUPPORTED_ON_ROBOT_TYPE, message, details, wrapping | ||
) | ||
|
||
|
||
class GripperNotAttachedError(ProtocolEngineError): | ||
|
@@ -789,3 +791,18 @@ def __init__( | |
) -> None: | ||
"""Build an EStopActivatedError.""" | ||
super().__init__(ErrorCodes.E_STOP_ACTIVATED, message, details, wrapping) | ||
|
||
|
||
class NotSupportedOnRobotType(ProtocolEngineError): | ||
"""Raised when attempting to perform an action that is not supported for the given robot type.""" | ||
Comment on lines
+796
to
+797
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the difference between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
def __init__( | ||
self, | ||
message: Optional[str] = None, | ||
details: Optional[Dict[str, Any]] = None, | ||
wrapping: Optional[Sequence[EnumeratedError]] = None, | ||
) -> None: | ||
"""Build a NotSupportedOnRobotType exception.""" | ||
super().__init__( | ||
ErrorCodes.NOT_SUPPORTED_ON_ROBOT_TYPE, message, details, wrapping | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add like
"action": "gripper-move-labware"
or something to details?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between that and putting
"Labware movement using a gripper is not supported on the OT2"
inmessage
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing :) it's just nice to have both