From 1afe625395c10456ca684cb7c6f208585fc4536e Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 23 Sep 2022 14:02:50 +0530 Subject: [PATCH] Island: Catch KeyError in AgentSignals resource's POST --- monkey/monkey_island/cc/resources/agent_signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/resources/agent_signals.py b/monkey/monkey_island/cc/resources/agent_signals.py index 2b4439231..71afe4b71 100644 --- a/monkey/monkey_island/cc/resources/agent_signals.py +++ b/monkey/monkey_island/cc/resources/agent_signals.py @@ -32,7 +32,7 @@ class AgentSignals(AbstractResource): IslandEventTopic.TERMINATE_AGENTS, timestamp=terminate_timestamp ) - except (JSONDecodeError, TypeError, ValueError) as err: + except (JSONDecodeError, TypeError, ValueError, KeyError) as err: return {"error": err}, HTTPStatus.BAD_REQUEST return {}, HTTPStatus.NO_CONTENT