Skip to content

Commit 37ff877

Browse files
committed
Add logger for communication exception
1 parent 092633c commit 37ff877

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/isar/state_machine/states/monitor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ def _run(self) -> None:
7575
except ThreadedRequestNotFinishedError:
7676
time.sleep(self.state_machine.sleep_time)
7777
continue
78-
7978
except (
8079
RobotCommunicationTimeoutException,
8180
RobotCommunicationException,
8281
) as e:
8382
task_failed: bool = self._handle_communication_retry(e)
8483
if task_failed:
84+
self.logger.error(
85+
f"Monitoring task {self.state_machine.current_task.id[:8]} failed "
86+
f"because: {e.error_description}"
87+
)
8588
status = TaskStatus.Failed
8689
else:
8790
continue

0 commit comments

Comments
 (0)