10#ifndef PIPECAT_ERRORS_H
11#define PIPECAT_ERRORS_H
21 using std::runtime_error::runtime_error;
33 int status()
const {
return _status; }
44 const std::string& message =
45 "Bot did not become ready within the connect timeout"
55 const std::string& message =
"Unable to connect the transport"
66 const std::string& message =
"Invalid transport connection params"
77 const std::string& message =
78 "Bot is not ready, call connect() first"
89 const std::string& message =
90 "Client already started, call disconnect() first"
102 const std::string& message =
""
106 (message.empty() ?
"" :
": " + message)
111 const std::string&
feature()
const {
return _feature; }
114 std::string _feature;
121 using PipecatError::PipecatError;
130 const std::string& message =
"Timed out waiting for a response"
140 const std::string& message =
141 "Message size exceeds the transport's limit"
BotAlreadyStartedError(const std::string &message="Client already started, call disconnect() first")
Creates the error.
Definition errors.h:88
BotNotReadyError(const std::string &message="Bot is not ready, call connect() first")
Creates the error.
Definition errors.h:76
The bot didn't become ready in time. Thrown by PipecatClient::connect().
Definition errors.h:40
ConnectionTimeoutError(const std::string &message="Bot did not become ready within the connect timeout")
Creates the error.
Definition errors.h:43
InvalidTransportParamsError(const std::string &message="Invalid transport connection params")
Creates the error.
Definition errors.h:65
Base class of all the errors thrown by the client.
Definition errors.h:19
RequestTimeoutError(const std::string &message="Timed out waiting for a response")
Creates the error.
Definition errors.h:129
Starting the bot failed. Thrown by PipecatClient::start_bot().
Definition errors.h:25
int status() const
The HTTP status of the answer, or 0 if there was no answer.
Definition errors.h:33
StartBotError(const std::string &message, int status=0)
Definition errors.h:29
The transport couldn't connect. Thrown by Transport::connect().
Definition errors.h:51
TransportStartError(const std::string &message="Unable to connect the transport")
Creates the error.
Definition errors.h:54
The transport or the bot doesn't support a feature.
Definition errors.h:96
const std::string & feature() const
The feature that isn't supported, e.g. "DTMF".
Definition errors.h:111
UnsupportedFeatureError(const std::string &feature, const std::string &message="")
Definition errors.h:100
The Pipecat C++ client SDK.
Definition client.h:29