Skip to content

Commit 75feb54

Browse files
add comment
1 parent 2452009 commit 75feb54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/client/components/Chat/error.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ export const handleCompletionStreamError = (err: any, file: string) => {
99
console.log('Error in completion stream: ', err)
1010
const error = err?.response?.data || err.message
1111

12+
//there is an error code 'Creating a stream took too long' which happens with slow internet connections
13+
//might want to show a loading spinner when it happens
1214
if (error === 'Model maximum context reached' && file) {
1315
enqueueSnackbar(t('error:tooLargeFile'), { variant: 'error' })
1416
} else if (error === 'Error parsing file' && file) {
1517
enqueueSnackbar(t('error:fileParsingError'), { variant: 'error' })
1618
} else {
17-
console.log('Unexpected error in completion stream: ', error)
19+
//console.log('Unexpected error in completion stream: ', error)
1820
//enqueueSnackbar(t('error:unexpected'), { variant: 'error' })
1921
}
2022
}

0 commit comments

Comments
 (0)