diff --git a/package.json b/package.json new file mode 100644 index 000000000000..bc38617ab0d6 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "@playwright/test": "^1.38.0" + }, + "dependencies": { + "lint": "^0.8.19" + } +} diff --git a/src/dispatch/conversation/exceptions.py b/src/dispatch/conversation/exceptions.py new file mode 100644 index 000000000000..d4b62bd49689 --- /dev/null +++ b/src/dispatch/conversation/exceptions.py @@ -0,0 +1,22 @@ +from dispatch.exceptions import DispatchException + + +class ConversationUpdateException(DispatchException): + """Base exception for all errors related to updating conversations.""" + + pass + + +class NoCaseConversationRelationException(ConversationUpdateException): + def __init__(self, case_id: int): + super().__init__(f"No relationship between case {case_id} and a conversation.") + + +class NoIncidentConversationRelationException(ConversationUpdateException): + def __init__(self, incident_id: int): + super().__init__(f"No relationship between incident {incident_id} and a conversation.") + + +class NoConversationPluginException(ConversationUpdateException): + def __init__(self, msg: str = None): + super().__init__("No conversation plugin enabled.") diff --git a/src/dispatch/document/exceptions.py b/src/dispatch/document/exceptions.py new file mode 100644 index 000000000000..8e71b91a57a0 --- /dev/null +++ b/src/dispatch/document/exceptions.py @@ -0,0 +1,12 @@ +from dispatch.exceptions import DispatchException + + +class ConversationUpdateException(DispatchException): + """Base exception for all errors related to updating conversations.""" + + pass + + +class NoDocumentRelationError(ConversationUpdateException): + def __init__(self, subject_id: int): + super().__init__(f"No relationship between subject {subject_id} and a document.")