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.
2 parents fa6b1f7 + 762a415 commit 12f6080Copy full SHA for 12f6080
frontend/apps/app/app/api/chat/stream/route.ts
@@ -5,6 +5,7 @@ import {
5
invokeDbAgentStream,
6
} from '@liam-hq/agent'
7
import { SSE_EVENTS } from '@liam-hq/agent/client'
8
+import * as Sentry from '@sentry/nextjs'
9
import { NextResponse } from 'next/server'
10
import * as v from 'valibot'
11
import { createClient } from '../../../../libs/db/server'
@@ -128,6 +129,8 @@ export async function POST(request: Request) {
128
129
}
130
controller.enqueue(enc.encode(line(SSE_EVENTS.END, null)))
131
} catch (err) {
132
+ Sentry.captureException(err)
133
+
134
const message = err instanceof Error ? err.message : String(err)
135
controller.enqueue(enc.encode(line(SSE_EVENTS.ERROR, { message })))
136
} finally {
0 commit comments