From b21672335f7f7cad5cca8fed1a8edf9909850934 Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 16 Feb 2026 16:47:07 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8B=20chore:=20Document=20Uncaught=20E?= =?UTF-8?q?xception=20Config=20and=20Fix=20Empty=20Text=20Export=20(#11812?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: Prevent empty text parts in conversation export function Added a check to return an empty array if the text part of the conversation is empty or consists only of whitespace, ensuring cleaner data handling in the export process. * chore: Update .env.example to include CONTINUE_ON_UNCAUGHT_EXCEPTION variable Added documentation for the CONTINUE_ON_UNCAUGHT_EXCEPTION environment variable, which allows the app to continue running after encountering uncaught exceptions. This change is not recommended for production environments unless necessary. --- .env.example | 4 ++++ client/src/hooks/Conversations/useExportConversation.ts | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.env.example b/.env.example index 4fd526f569..ec848c72a0 100644 --- a/.env.example +++ b/.env.example @@ -47,6 +47,10 @@ TRUST_PROXY=1 # password policies. # MIN_PASSWORD_LENGTH=8 +# When enabled, the app will continue running after encountering uncaught exceptions +# instead of exiting the process. Not recommended for production unless necessary. +# CONTINUE_ON_UNCAUGHT_EXCEPTION=false + #===============# # JSON Logging # #===============# diff --git a/client/src/hooks/Conversations/useExportConversation.ts b/client/src/hooks/Conversations/useExportConversation.ts index 579b5f1cf6..dc352ccab9 100644 --- a/client/src/hooks/Conversations/useExportConversation.ts +++ b/client/src/hooks/Conversations/useExportConversation.ts @@ -106,6 +106,9 @@ export default function useExportConversation({ // TEXT const textPart = content[ContentTypes.TEXT]; const text = typeof textPart === 'string' ? textPart : (textPart?.value ?? ''); + if (text.trim().length === 0) { + return []; + } return [sender, text]; }