diff --git a/src/dispatch/plugins/dispatch_slack/plugin.py b/src/dispatch/plugins/dispatch_slack/plugin.py index dd93e2c22c7a..e2968d94cd48 100644 --- a/src/dispatch/plugins/dispatch_slack/plugin.py +++ b/src/dispatch/plugins/dispatch_slack/plugin.py @@ -107,7 +107,9 @@ def create_threaded(self, case: Case, conversation_id: str, db_session: Session) client=client, config=self.configuration, ) - if message: + if message and isinstance(message, dict): + # we update the genai_analysis field in the case model with the message if it's a dict + # if the message is a string, it means there was an error generating the analysis case.genai_analysis = message if message_blocks: