Show error messages - where they belong.

This commit is contained in:
Enrico Ros
2024-02-10 21:57:38 -08:00
parent a5d70e4ca3
commit 7955bf2b86
-2
View File
@@ -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;
}