forked from p15670423/monkey
Island: Catch KeyError in AgentSignals resource's POST
This commit is contained in:
parent
cca4cf9df2
commit
1afe625395
|
@ -32,7 +32,7 @@ class AgentSignals(AbstractResource):
|
||||||
IslandEventTopic.TERMINATE_AGENTS, timestamp=terminate_timestamp
|
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 {"error": err}, HTTPStatus.BAD_REQUEST
|
||||||
|
|
||||||
return {}, HTTPStatus.NO_CONTENT
|
return {}, HTTPStatus.NO_CONTENT
|
||||||
|
|
Loading…
Reference in New Issue