Skip to content

Commit 512abac

Browse files
committed
feat: handling conversation error at end client
1 parent 3c72e62 commit 512abac

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rapidaai/react",
3-
"version": "1.1.63",
3+
"version": "1.1.64",
44
"description": "An easy to use react client for building generative ai application using Rapida platform.",
55
"repository": {
66
"type": "git",

src/audio/message-protocol-handler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ export class MessageProtocolHandler {
130130
// Conversation error (server-side error with conversation ID and details)
131131
if (response.hasError()) {
132132
const error = response.getError();
133-
if (error) this.callbacks.onError?.(new Error(error.getMessage()));
133+
if (error) {
134+
this.callbacks.onError?.(new Error(error.getMessage()));
135+
this.callbacks.onConversationError?.(error.toObject());
136+
}
134137
}
135138

136139
// Metric (server-side performance/latency data)

0 commit comments

Comments
 (0)