We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ee8fc8 commit 77e04b5Copy full SHA for 77e04b5
src/search/components/input/AskAIResults.tsx
@@ -195,6 +195,18 @@ export function AskAIResults({
195
let parsedLine
196
try {
197
parsedLine = JSON.parse(line)
198
+ // If midstream there is an error, like a connection reset / lost, our backend will send an error JSON
199
+ if (parsedLine?.errors) {
200
+ sendAISearchResultEvent({
201
+ sources: [],
202
+ message: JSON.stringify(parsedLine.errors),
203
+ eventGroupId: askAIEventGroupId.current,
204
+ couldNotAnswer: false,
205
+ status: 500,
206
+ })
207
+ setAISearchError()
208
+ return
209
+ }
210
} catch (e) {
211
console.error(
212
'Failed to parse JSON:',
0 commit comments