自动生成
此文档由 make doc-gen 命令从 Python 源码注释自动生成。
Exception
异常定义
类
AgentRunError
class AgentRunError(Exception)
AgentRun SDK 基础异常类
方法
🔹 构造函数
def __init__(self, message: str, **kwargs)
初始化异常
Args:
message: 错误消息details: 详细信息
🔹 kwargs_str
def kwargs_str(cls, **kwargs) -> str
获取详细信息字符串
Returns:
str: 详细信息字符串
🔹 details_str
def details_str(self) -> str
HTTPError
class HTTPError(AgentRunError)
HTTP 异常类
方法
🔹 构造函数
def __init__(self, status_code: int, message: str, request_id: Optional[str] = None, **kwargs)
🔹 to_resource_error
def to_resource_error(self, resource_type: str, resource_id: Optional[str] = '')
ClientError
class ClientError(HTTPError)
客户端异常类
方法
🔹 构造函数
def __init__(self, status_code: int, message: str, request_id: Optional[str] = None, **kwargs)
ServerError
class ServerError(HTTPError)
服务端异常类
方法
🔹 构造函数
def __init__(self, status_code: int, message: str, request_id: Optional[str] = None)
ResourceNotExistError
class ResourceNotExistError(AgentRunError)
资源不存在异常
方法
🔹 构造函数
def __init__(self, resource_type: str, resource_id: Optional[str] = '')
ResourceAlreadyExistError
class ResourceAlreadyExistError(AgentRunError)
资源已存在异常
方法
🔹 构造函数
def __init__(self, resource_type: str, resource_id: Optional[str] = '')
DeleteResourceError
class DeleteResourceError(AgentRunError)
删除资源异常
方法
🔹 构造函数
def __init__(self, message: Optional[str] = None)