Skip to content

Commit b216723

Browse files
authored
📋 chore: Document Uncaught Exception Config and Fix Empty Text Export (#11812)
* 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.
1 parent 35672e0 commit b216723

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎.env.example‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ TRUST_PROXY=1
4747
# password policies.
4848
# MIN_PASSWORD_LENGTH=8
4949

50+
# When enabled, the app will continue running after encountering uncaught exceptions
51+
# instead of exiting the process. Not recommended for production unless necessary.
52+
# CONTINUE_ON_UNCAUGHT_EXCEPTION=false
53+
5054
#===============#
5155
# JSON Logging #
5256
#===============#

‎client/src/hooks/Conversations/useExportConversation.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ export default function useExportConversation({
106106
// TEXT
107107
const textPart = content[ContentTypes.TEXT];
108108
const text = typeof textPart === 'string' ? textPart : (textPart?.value ?? '');
109+
if (text.trim().length === 0) {
110+
return [];
111+
}
109112
return [sender, text];
110113
}
111114

0 commit comments

Comments
 (0)