RTVIError Type
BasePipecatClient error type, extends Error and primarily introduces the status field. Most methods will try to throw an error of this type when something goes wrong. This is different from the RTVI error event and its corresponding onError callback, which report errors sent by the bot and some client-side failures.
number | undefined
A unique identifier (or HTTP code if applicable) for the error.
string
A human-readable message describing the error.
Pre-defined RTVIErrors
ConnectionTimeoutError
Reserved for a connection that times out. The client itself does not raise it (connect() applies no timeout of its own), so it appears only if a transport raises it.
BotAlreadyStartedError
Thrown bystartBot(), connect() or startBotAndConnect() when the client is already started. Call disconnect() before starting again.
MessageTooLargeError
Thrown when a message exceeds the transport’s maximum size: 64 KiB by default. Most likely when sending images or a large context throughsendClientMessage().
StartBotError
Emitted fromstartBot() or startBotAndConnect() when the endpoint responds with an error or the fetch itself fails. This may be due to the endpoint being unavailable, or the server failing to parse the provided data.
string
required
All
StartBotError instances will have an error field set to
invalid-request-error.number
default:"500"
HTTP status code returned by the endpoint.
500 when there was no HTTP
response, such as a network failure or timeout.string
Verbose error message returned by the endpoint, if provided. To take advantage
of this, the endpoint should return an error response with a JSON object with
an
info or detail field containing the error message. Without either, the
response’s status text is used.TransportStartError
Emitted when the Transport is not able to connect. You may need to check the connection parameters provided or returned from your endpoint.InvalidTransportParamsError
Exported, but neither the client nor the official transports raise it:connect() reports invalid connection parameters as a plain RTVIError.
BotNotReadyError
Emitted when the client attempts to perform an action or method that requires the bot to be in a ready state, but the bot is not ready. You must callconnect() first and wait for the bot to be ready before performing such actions.
DeviceError
Emitted when there is an issue with acquiring or using a media device, such as a camera or microphone. This could be due to permissions issues, device unavailability, or other related problems.array<'cam' | 'mic' | 'speaker'>
required
List of media devices,
'cam', 'mic', and/or 'speaker', that are
unavailable or could not be accessed.string
required
The
type field will indicate what type of device error occurred. Options include:"in-use": A device is currently in use by another application and cannot be accessed. windows only"permissions": The user has not granted permission to access the media device."undefined-mediadevices":getUserMedia()is not an available API on the current platform or browser."not-found": The specified media device could not be found."constraints": The media device could not be configured with the specified constraints."unknown": An unknown error occurred while accessing the media device.
object
Additional details about the device error, if available.
UnsupportedFeatureError
Thrown when a feature is requested that the current transport or bot does not support.sendDTMF() and sendFile() throw it for bots on an older RTVI protocol. For enableCam(), enableScreenShare(), and selectedCam, the client passes it to the onUnsupportedFeature callback instead of throwing.
string
required
This custom field will contain the name of the unsupported feature.