from pipecatcloud.exception import AgentStartErrortry: response = await session.start()except AgentStartError as e: print(f"Failed to start agent: {e}") if e.error_code == "429": print("Agent pool at capacity. Try again later.") elif e.error_code == "404": print("Agent not found.")
Raised when attempting to interact with an agent that is not in a ready state.
Copy
Ask AI
from pipecatcloud.exception import AgentNotHealthyErrortry: response = await session.start()except AgentNotHealthyError as e: print(f"Agent is not ready: {e}") print("Check agent status with: pcc agent status my-agent")
Raised when authentication fails or token has expired.
Copy
Ask AI
from pipecatcloud.exception import AuthErrortry: # Operation requiring authenticationexcept AuthError: print("Your session has expired. Please log in again.") # Prompt user to reauthenticate
Raised when there are issues with configuration storage or retrieval.
Copy
Ask AI
from pipecatcloud.exception import ConfigErrortry: # Operation requiring configexcept ConfigError as e: print(f"Configuration error: {e.message}") # Guide user to fix configuration