forked from p15670423/monkey
Island: Fix typo occured -> occurred
This commit is contained in:
parent
078574998a
commit
f7f4440b61
|
@ -16,7 +16,7 @@ class IAgentEventRepository(ABC):
|
||||||
Save an event to the repository
|
Save an event to the repository
|
||||||
|
|
||||||
:param event: The event to store in the repository
|
:param event: The event to store in the repository
|
||||||
:raises StorageError: If an error occured while attempting to save an event
|
:raises StorageError: If an error occurred while attempting to save an event
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
@ -25,7 +25,7 @@ class IAgentEventRepository(ABC):
|
||||||
Retrieve all events stored in the repository
|
Retrieve all events stored in the repository
|
||||||
|
|
||||||
:return: All stored events
|
:return: All stored events
|
||||||
:raises RetrievalError: If an error occured while attempting to retrieve the events
|
:raises RetrievalError: If an error occurred while attempting to retrieve the events
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
@ -35,7 +35,7 @@ class IAgentEventRepository(ABC):
|
||||||
|
|
||||||
:param event_type: Type of event
|
:param event_type: Type of event
|
||||||
:return: Stored events that have same type
|
:return: Stored events that have same type
|
||||||
:raises RetrievalError: If an error occured while attempting to retrieve the event
|
:raises RetrievalError: If an error occurred while attempting to retrieve the event
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
@ -45,7 +45,7 @@ class IAgentEventRepository(ABC):
|
||||||
|
|
||||||
:param tag: Tag of event
|
:param tag: Tag of event
|
||||||
:return: Stored events that have same tag
|
:return: Stored events that have same tag
|
||||||
:raises RetrievalError: If an error occured while attempting to retrieve the event
|
:raises RetrievalError: If an error occurred while attempting to retrieve the event
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
@ -55,7 +55,7 @@ class IAgentEventRepository(ABC):
|
||||||
|
|
||||||
:param source: The ID of the agent that observed the events
|
:param source: The ID of the agent that observed the events
|
||||||
:return: Stored events that have same source
|
:return: Stored events that have same source
|
||||||
:raises RetrievalError: If an error occured while attempting to retrieve the event
|
:raises RetrievalError: If an error occurred while attempting to retrieve the event
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|
|
@ -30,7 +30,7 @@ class AgentEvents(AbstractResource):
|
||||||
serializer = self._event_serializer_registry[event[EVENT_TYPE_FIELD]]
|
serializer = self._event_serializer_registry[event[EVENT_TYPE_FIELD]]
|
||||||
deserialized_event = serializer.deserialize(event)
|
deserialized_event = serializer.deserialize(event)
|
||||||
except (TypeError, ValueError) as err:
|
except (TypeError, ValueError) as err:
|
||||||
logger.debug(f"Error occured deserializing an event {event}: {err}")
|
logger.debug(f"Error occurred while deserializing an event {event}: {err}")
|
||||||
return {"error": str(err)}, HTTPStatus.BAD_REQUEST
|
return {"error": str(err)}, HTTPStatus.BAD_REQUEST
|
||||||
|
|
||||||
self._agent_event_queue.publish(deserialized_event)
|
self._agent_event_queue.publish(deserialized_event)
|
||||||
|
|
Loading…
Reference in New Issue