Skip to content

Commit a929349

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

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@ export const AssistantChat: React.FunctionComponent<AssistantChatProps> = ({
5555
const track = useTelemetry();
5656
const { messages, sendMessage, status, error, clearError } = useChat({
5757
chat,
58-
onError: () => {
59-
track('Assistant Response Failed', () => ({}));
58+
onError: (error) => {
59+
track('Assistant Response Failed', () => ({
60+
error_name: error.name,
61+
}));
6062
},
6163
});
6264

packages/compass-telemetry/src/telemetry-events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@ type AssistantEntryPointUsedEvent = ConnectionScopedEvent<{
15051505
type AssistantResponseFailedEvent = CommonEvent<{
15061506
name: 'Assistant Response Failed';
15071507
payload: {
1508-
error_code?: string;
1508+
error_name?: string;
15091509
};
15101510
}>;
15111511

0 commit comments

Comments
 (0)