Exceptions API Reference
April 16, 2026 ยท View on GitHub
AgentBayError
class AgentBayError(Exception)
Base exception for all AgentBay SDK errors.
init
def __init__(self, message=None, *args, **kwargs)
WsCancelledError
class WsCancelledError(AgentBayError)
Raised when a WS stream is cancelled by the caller.
AuthenticationError
class AuthenticationError(AgentBayError)
Raised when there is an authentication error.
init
def __init__(self, message="Authentication failed", *args, **kwargs)
APIError
class APIError(AgentBayError)
Raised when there is an error with the API.
init
def __init__(self, message="API error", status_code=None, *args, **kwargs)
FileError
class FileError(AgentBayError)
Raised for errors related to file operations.
init
def __init__(self, message="File operation error", *args, **kwargs)
CommandError
class CommandError(AgentBayError)
Raised for errors related to command execution.
init
def __init__(self, message="Command execution error", *args, **kwargs)
SessionError
class SessionError(AgentBayError)
Raised for errors related to session operations.
init
def __init__(self, message="Session error", *args, **kwargs)
OssError
class OssError(AgentBayError)
Raised for errors related to OSS operations.
init
def __init__(self, message="OSS operation error", *args, **kwargs)
BrowserError
class BrowserError(AgentBayError)
Raised when there is an error with the browser.
init
def __init__(self, message="Browser error", *args, **kwargs)
AgentError
class AgentError(AgentBayError)
Raised for errors related to Agent actions.
init
def __init__(self, message="Agent action error", *args, **kwargs)
ClearanceTimeoutError
class ClearanceTimeoutError(AgentBayError)
Raised when context clearing operation times out.
init
def __init__(self, message="Context clearing operation timed out", *args, **kwargs)
GitError
class GitError(AgentBayError)
Base exception for all git operations.
Attributes:
exit_code: The exit code returned by the git command.
stderr: The stderr output from the git command.
init
def __init__(self, message="Git operation error",
exit_code=1,
stderr="",
*args,
**kwargs)
GitAuthError
class GitAuthError(GitError)
Raised when git authentication fails.
Common causes include invalid credentials, missing access tokens, or insufficient repository permissions.
init
def __init__(self, message="Git authentication error",
exit_code=1,
stderr="",
*args,
**kwargs)
GitNotFoundError
class GitNotFoundError(GitError)
Raised when git is not installed or not found on the remote environment.
init
def __init__(self, message="Git not found",
exit_code=127,
stderr="",
*args,
**kwargs)
GitConflictError
class GitConflictError(GitError)
Raised when a git merge or rebase conflict occurs.
init
def __init__(self, message="Git merge conflict",
exit_code=1,
stderr="",
*args,
**kwargs)
GitNotARepoError
class GitNotARepoError(GitError)
Raised when the target directory is not a git repository.
init
def __init__(self, message="Not a git repository",
exit_code=128,
stderr="",
*args,
**kwargs)
PtyError
class PtyError(AgentBayError)
Base exception for all PTY operations.
init
def __init__(self, message="PTY operation error", *args, **kwargs)
PtySessionNotFoundError
class PtySessionNotFoundError(PtyError)
Raised when a PTY session does not exist or has been terminated.
init
def __init__(self, message="PTY session not found", *args, **kwargs)
PtyNotConnectedError
class PtyNotConnectedError(PtyError)
Raised when attempting to use a PTY handle that is not connected.
init
def __init__(self, message="PTY handle is not connected", *args, **kwargs)
See Also
Documentation generated automatically from source code using pydoc-markdown.