From 44eeb2193ce68c2f235debb3a552b7bfef269dea Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 19 Mar 2024 14:09:40 -0400 Subject: [PATCH] Update `failed_command` docstring. --- api/src/opentrons/protocol_engine/state/commands.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/src/opentrons/protocol_engine/state/commands.py b/api/src/opentrons/protocol_engine/state/commands.py index c9af4d20639..90b3ea210f6 100644 --- a/api/src/opentrons/protocol_engine/state/commands.py +++ b/api/src/opentrons/protocol_engine/state/commands.py @@ -173,7 +173,12 @@ class CommandState: """ failed_command: Optional[CommandEntry] - """The command, if any, that made the run fail and the index in the command list.""" + """The most recent command failure, if any.""" + # TODO(mm, 2024-03-19): This attribute is currently only used to help robot-server + # with pagination, but "the failed command" is an increasingly nuanced idea, now + # that we're doing error recovery. See if we can implement robot-server pagination + # atop simpler concepts, like "the last command that ran" or "the next command that + # would run." finish_error: Optional[ErrorOccurrence] """The error that happened during the post-run finish steps (homing & dropping tips), if any."""