Skip to content

Commit 5e0b5ce

Browse files
committed
fix: do not show error if the stream creation took too long, its meant to be silent
1 parent f5fef18 commit 5e0b5ce

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/client/components/Chat/error.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ export const handleCompletionStreamError = (err: any, file: string) => {
1313
enqueueSnackbar(t('error:tooLargeFile'), { variant: 'error' })
1414
} else if (error === 'Error parsing file' && file) {
1515
enqueueSnackbar(t('error:fileParsingError'), { variant: 'error' })
16-
} else if (error === 'Creating a stream took too long') {
17-
enqueueSnackbar(t('error:streamCreationTimeout'), { variant: 'warning' })
1816
} else {
1917
enqueueSnackbar(t('error:unexpected'), { variant: 'error' })
2018
}

src/client/components/Chat/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ const Chat = () => {
258258
) => {
259259
if (!abortController || abortController.signal.aborted) return
260260

261-
abortController?.abort(new Error('Creating a stream took too long'))
261+
abortController?.abort('Creating a stream took too long')
262262
const newAbortController = new AbortController()
263263
setStreamController(newAbortController)
264264

0 commit comments

Comments
 (0)