KheelonaVoiceError
Every failure KheelonaVoice.connect rejects with. After a failed connect(), create a new session (a new client
secret) before trying again.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new KheelonaVoiceError(
code,message,options?):KheelonaVoiceError
Parameters
Section titled “Parameters”"invalid_request" | "invalid_audio" | "unauthenticated" | "secret_expired" | "forbidden" | "origin_not_allowed" | "voice_not_found" | "session_not_found" | "capacity_exhausted" | "partner_limit_reached" | "rate_limited" | "provider_unavailable" | "internal" | "not_found" | "conflict" | "unavailable" | SdkErrorCode
The error code.
message
Section titled “message”string
A readable description. Log it freely.
options?
Section titled “options?”cause keeps the browser’s own error as Error.cause: don’t log it verbatim, its text can quote
connection details.
cause?
Section titled “cause?”unknown
retryable?
Section titled “retryable?”boolean
retryAfterMs?
Section titled “retryAfterMs?”number
Returns
Section titled “Returns”KheelonaVoiceError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”code:
"invalid_request"|"invalid_audio"|"unauthenticated"|"secret_expired"|"forbidden"|"origin_not_allowed"|"voice_not_found"|"session_not_found"|"capacity_exhausted"|"partner_limit_reached"|"rate_limited"|"provider_unavailable"|"internal"|"not_found"|"conflict"|"unavailable"|SdkErrorCode
What went wrong. Branch on this, not on message.
name:
string='KheelonaVoiceError'
Overrides
Section titled “Overrides”Error.name
retryable
Section titled “retryable”retryable:
boolean
Retrying the same call later can succeed.
retryAfterMs?
Section titled “retryAfterMs?”
optionalretryAfterMs?:number
How long to wait before retrying, in milliseconds, when the service said so.