Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit b604d73

Browse files
authored
rejectionReason is on userMessage not assistantMessage (#692)
1 parent 4a9c94b commit b604d73

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/chatbot-server-mongodb-public/src/tracing/routesUpdateTraceHandlers.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ export function makeAddMessageToConversationUpdateTrace({
9595
createdAt: assistantMessage.createdAt,
9696
isVerifiedAnswer: tracingData.isVerifiedAnswer ?? false,
9797
rejectionReason: tracingData.rejectQuery
98-
? (assistantMessage.customData?.rejectionReason as
99-
| string
100-
| undefined) ?? "Unknown rejection reason"
98+
? (userMessage.customData?.rejectionReason as string | undefined) ??
99+
"Unknown rejection reason"
101100
: undefined,
102101
});
103102
} else {

0 commit comments

Comments
 (0)