Skip to content

Commit

Permalink
Add logger for communication exception
Browse files Browse the repository at this point in the history
  • Loading branch information
mrica-equinor committed Dec 2, 2024
1 parent ce0e4e4 commit d1a0cbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/isar/state_machine/states/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,16 @@ def _run(self) -> None:
except ThreadedRequestNotFinishedError:
time.sleep(self.state_machine.sleep_time)
continue

except (
RobotCommunicationTimeoutException,
RobotCommunicationException,
) as e:
task_failed: bool = self._handle_communication_retry(e)
if task_failed:
self.logger.error(
f"Monitoring task {self.state_machine.current_task.id[:8]} failed "
f"because: {e.error_description}"
)
status = TaskStatus.Failed
else:
continue
Expand Down

0 comments on commit d1a0cbc

Please sign in to comment.