ConversationError
ug-js-sdk / ConversationError
Interface: ConversationError
Defined in: types/index.ts:360
Error information when something goes wrong in the conversation.
Example
hooks: {
onError: (error) => {
switch (error.type) {
case 'mic_denied':
alert('Please allow microphone access')
break
case 'network_error':
console.error('Connection lost:', error.message)
break
}
}
}
Properties
type
type:
"mic_denied"|"network_timeout"|"network_error"|"server_error"|"decode_error"
Defined in: types/index.ts:369
Error type:
mic_denied- User denied microphone permissionnetwork_timeout- Request timed outnetwork_error- WebSocket connection errorserver_error- Server returned an errordecode_error- Failed to decode audio data
message
message:
string
Defined in: types/index.ts:371
Human-readable error message
originalError?
optionaloriginalError:Error
Defined in: types/index.ts:373
Original error object if available