tell_backend: all exceptions where being caught and squashed/renamed. Hopefully fixed, may lead to strange error behaviours for other fails.
Build and Publish / test (push) Failing after 2m1s
Build and Publish / build (push) Skipped
Build and Publish / Build and Deploy Docs (push) Skipped

This commit is contained in:
appleb_m committed 2026-07-02 17:31:20 +02:00
1 parent 25f8959ffc
commit 1b7c254654
2 files changed
+14 -14

No files matched your search

+11
View File
@@ -1143,6 +1143,17 @@ class AareDAQ:
)
raise
except TellCommunicationError as e:
self._last_mount_error_message = str(e) or "Mount failed"
logger.error(f"Tell communication error occured: {e}")
self._handle_operation_error(
operation=DAQOperation.MOUNT if sample is not None else DAQOperation.UNMOUNT,
sample=sample,
error=e,
event_type=SampleEventType.MOUNTFAILED,
)
raise
except Exception as e:
self._last_mount_error_message = str(e) or "Mount failed"
logger.error(f"Mount failed: {e}")
+3 -14
View File
@@ -279,12 +279,6 @@ class TellClient:
)
logger.info(f"event: {event} occurred with value: {value}")
if event is None or event == "state":
# TELL reports a state transition (typically "Busy" then
# "Ready"). Event timing means we sometimes observe the
# intermediate "Busy", and the value can arrive quoted or
# unquoted, so we do not trust the event value here. Instead
# wait for the mount to finish and let check_command_ok be
# the sole authority on success/failure.
state_value = str(value).strip().strip('"\'').lower()
if state_value == "busy":
logger.warning("got busy response from robot, waiting for mount to complete")
@@ -293,12 +287,6 @@ class TellClient:
timeout=wait_timeout, msg=f"Mount {segment}{puck}-{sample}: "
)
logger.info(f"Check command okay response: {msg}")
# check_command_ok blocks (wait_not_busy) until the whole
# mount sequence has finished, so the gripper-detection event
# we observed as an intermediate "state"/Busy event is now
# resolved. The robot's own record is authoritative: if it
# reports nothing mounted, the gripper was empty (no pin),
# which we must surface rather than reporting success.
if self.get_mounted_sample() is None:
logger.warning("Mount command completed but robot reports no sample mounted")
return TellEventValueEnum.NO_PIN_IN_GRIPPER
@@ -348,10 +336,11 @@ class TellClient:
)
logger.info("post waiting")
return TellEventValueEnum.SUCCESS
except TellCommunicationError:
raise
except Exception as e:
logger.error(f"Exception occurred: {e}")
raise TellCommunicationError(message=f"Mount {segment}{puck}-{sample}", critical=True)
raise TellCommunicationError(message=f"Error during mount {segment}{puck}-{sample}: {e}", critical=True)
def unmount(self, force=False, wait=False, timeout=360.0):
if self.is_busy():