From fe6bc3bc5d4b793ddc8579711f9a2c9513b6718a Mon Sep 17 00:00:00 2001 From: tamarzanzouri Date: Fri, 26 Jul 2024 13:52:59 -0400 Subject: [PATCH] return ErrorRecoveryType and docstring --- api/src/opentrons/protocol_engine/protocol_engine.py | 1 + robot-server/robot_server/runs/error_recovery_mapping.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/opentrons/protocol_engine/protocol_engine.py b/api/src/opentrons/protocol_engine/protocol_engine.py index 505968ab45a..8b5f2ad6588 100644 --- a/api/src/opentrons/protocol_engine/protocol_engine.py +++ b/api/src/opentrons/protocol_engine/protocol_engine.py @@ -615,6 +615,7 @@ def set_and_start_queue_worker( self._queue_worker.start() async def set_error_recovery_policy(self, policy: ErrorRecoveryPolicy) -> None: + """Set error recovery policy for run.""" raise NotImplementedError("set_error_recovery_policy is not implemented yet") diff --git a/robot-server/robot_server/runs/error_recovery_mapping.py b/robot-server/robot_server/runs/error_recovery_mapping.py index 28664079a1d..81cdbeb27f3 100644 --- a/robot-server/robot_server/runs/error_recovery_mapping.py +++ b/robot-server/robot_server/runs/error_recovery_mapping.py @@ -37,7 +37,7 @@ def _policy( if command_type_matches and error_type_matches: if rule.ifMatch == ReactionIfMatch.IGNORE_AND_CONTINUE: - raise NotImplementedError # No protocol engine support for this yet. It's in EXEC-302. + return ErrorRecoveryType.IGNORE_AND_CONTINUE elif rule.ifMatch == ReactionIfMatch.FAIL_RUN: return ErrorRecoveryType.FAIL_RUN elif rule.ifMatch == ReactionIfMatch.WAIT_FOR_RECOVERY: