Skip to main content
The Pipecat Cloud SDK defines several exception classes to help you handle different error conditions.

Base Exception Class

Error

Base class for the SDK’s exceptions, with one exception of its own: ConfigFileError subclasses Exception directly, so catching Error will not catch it.

Session Errors

AgentStartError

Raised when an agent fails to start.
Session.start() raises this for every failure it can report — a missing API key, an agent that doesn’t exist, an agent that isn’t ready, and capacity limits — so error_code is how you tell them apart.

Properties

string
Error message with details about the failure, prefixed with the error code.
string | None
The API’s error code, such as PCC-1002 or PCC-AGENT-AT-CAPACITY. See Troubleshooting for what each one means. None when the failure carried no structured error body.

AgentNotHealthyError

Defined and exported by the package, but nothing in the SDK raises it. An agent that isn’t in a ready state surfaces as an AgentStartError instead, so catch that:
It appears in pipecatcloud.__all__, so it is importable and safe to reference in an except clause — it just won’t ever match.

Authentication Errors

AuthError

Raised when authentication fails or token has expired.

Properties

string
Message explaining the authentication failure.

Configuration Errors

ConfigError

Raised when there are issues with configuration storage or retrieval.

Properties

string
default:"'Failed to update configuration'"
Message explaining the configuration issue.

ConfigFileError

Raised when the configuration file is malformed. Unlike every other exception here it subclasses Exception rather than Error, so a broad except Error won’t catch it.

InvalidError

Raised when an invalid operation is attempted.