类class
agentscope.app.hubHubError
class HubError(Exception)
源码Source
agentscope/app/hub/_error.py:5–29中心错误,把智能体接入外部消息渠道与企业平台。位于 agentscope.app.hub 包,继承自 Exception。
One type for every hub: the registries differ but the failure does
not, and a caller that wants to map an upstream 429 onto a 503 has
to catch something. hub_id says which hub failed, so a page
listing several of them can name the one at fault.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
def __init__(hub_id: str, status_code: int, message: str) -> None | 初始化 `HubError` 实例。 Initialize the error. |
构造器详情Constructor Detail
HubError
def __init__(hub_id: str, status_code: int, message: str) -> None
初始化 HubError 实例。
Initialize the error.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
hub_id | str | 中心标识(类型 `str`)。The hub whose upstream failed. |
status_code | int | 状态 code(类型 `int`)。The HTTP status code the registry returned. |
message | str | 消息(类型 `str`)。The response body, surfaced verbatim — public registry errors are plain text and worth showing. |
源码Source
agentscope/app/hub/_error.py:14–29