RTVIError Type

Base PipecatClient error type, extends Error and primarily introducing the status field. Most methods will try to throw an error of this type when something goes wrong.
status
number
required
A unique identifier (or HTTP code if applicable) for the error.
message
string
required
A human-readable message describing the error.

Pre-defined RTVIErrors

ConnectionTimeoutError

Emitted when the bot does not enter a ready state within the specified timeout period during the connect() method call.

StartBotError

Emitted when the connect() method is called with an endpoint, and 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.
error
string
required
All StartBotError instances will have an error field set to invalid-request-error.
status
number
required
HTTP status code returned by the endpoint, if applicable.
message
string
required
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 field containing the error message.

TransportStartError

Emitted when the Transport is not able to connect. You may need to check the connection parameters provided or returned from you endpoint.

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 call connect() first and wait for the bot to be ready before performing such actions.

UnsupportedFeatureError

Not all Transports are created equal, and some may not support certain features. This error is thrown when a feature is requested that the current Transport does not support.
feature
string
required
This custom field will contain the name of the unsupported feature.