From 7955bf2b8656b042d4e675e1efc8fced0942b491 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Sat, 10 Feb 2024 21:57:38 -0800 Subject: [PATCH] Show error messages - where they belong. --- src/apps/chat/editors/chat-stream.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/apps/chat/editors/chat-stream.ts b/src/apps/chat/editors/chat-stream.ts index e309e4adf..3501f4647 100644 --- a/src/apps/chat/editors/chat-stream.ts +++ b/src/apps/chat/editors/chat-stream.ts @@ -113,8 +113,6 @@ async function streamAssistantMessage( } catch (error: any) { if (error?.name !== 'AbortError') { console.error('Fetch request error:', error); - // TODO: show an error to the UI? - } else { const errorText = ` [Issue: ${error.message || (typeof error === 'string' ? error : 'Chat stopped.')}]`; incrementalAnswer.text = (incrementalAnswer.text || '') + errorText; }