Skip to content

Commit bc46581

Browse files
committed
chore: add error tracking
1 parent 901ce97 commit bc46581

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/compass-assistant/src/assistant-chat.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,13 @@ const errorBannerWrapperStyles = css({
5252
export const AssistantChat: React.FunctionComponent<AssistantChatProps> = ({
5353
chat,
5454
}) => {
55+
const track = useTelemetry();
5556
const { messages, sendMessage, status, error, clearError } = useChat({
5657
chat,
58+
onError: () => {
59+
track('Assistant Response Failed', () => ({}));
60+
},
5761
});
58-
const track = useTelemetry();
5962

6063
// Transform AI SDK messages to LeafyGreen chat format
6164
const lgMessages = messages.map((message) => ({

0 commit comments

Comments
 (0)