From eacd42696931e466bb132a75e60ed6bbfd04ed1d Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Tue, 27 Sep 2022 18:42:06 +0000 Subject: [PATCH] Island: Handle StorageError in handle_scan_data --- .../monkey_island/cc/agent_event_handlers/handle_scan_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/agent_event_handlers/handle_scan_data.py b/monkey/monkey_island/cc/agent_event_handlers/handle_scan_data.py index 8e75860a8..b3c7eee2b 100644 --- a/monkey/monkey_island/cc/agent_event_handlers/handle_scan_data.py +++ b/monkey/monkey_island/cc/agent_event_handlers/handle_scan_data.py @@ -8,6 +8,7 @@ from monkey_island.cc.repository import ( IMachineRepository, INodeRepository, RetrievalError, + StorageError, UnknownRecordError, ) @@ -52,5 +53,5 @@ class handle_scan_data: self._node_repository.upsert_communication( src_machine.id, dest_machine.id, CommunicationType.SCANNED ) - except (RetrievalError, UnknownRecordError) as err: + except (RetrievalError, StorageError, UnknownRecordError) as err: logger.error(f"Unable to process scan data: {err}")