AS AgentScopeAPI 手册 / API Reference
类class agentscope.app.hub

HubError

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_idstr中心标识(类型 `str`)。The hub whose upstream failed.
status_codeint状态 code(类型 `int`)。The HTTP status code the registry returned.
messagestr消息(类型 `str`)。The response body, surfaced verbatim — public registry errors are plain text and worth showing.
源码Source agentscope/app/hub/_error.py:14–29
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.