AS AgentScopeAPI 手册 / API Reference

ApiErrorResponse

public record ApiErrorResponse(String type, ApiErrorDetail error)
源码Source io/agentscope/builder/web/api/error/ApiErrorResponse.java:19–24

承载 API 错误响应数据的记录类型。位于 io.agentscope.builder.web.api.error 包。核心成员包括 type、error、of。

Top-level HTTP error envelope: { "type": "error", "error": { ... } }.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
typeString
执行类型相关操作。
Performs the type operation.
errorApiErrorDetail
执行错误相关操作。
Performs the error operation.

方法摘要Method Summary

方法Method说明Description
public static ApiErrorResponse of(ApiErrorDetail detail)
static
创建并返回实例。
Creates and returns an instance.

记录组件详情Record Component Detail

type

String type

执行类型相关操作。

Performs the type operation.

源码Source io/agentscope/builder/web/api/error/ApiErrorResponse.java:19–24

error

ApiErrorDetail error

执行错误相关操作。

Performs the error operation.

源码Source io/agentscope/builder/web/api/error/ApiErrorResponse.java:19–24

方法详情Method Detail

of

public static ApiErrorResponse of(ApiErrorDetail detail)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
detailApiErrorDetail详情(类型 `ApiErrorDetail`)。The detail.
返回Returns ApiErrorResponse
返回ApiErrorResponse。Returns api error response.
源码Source io/agentscope/builder/web/api/error/ApiErrorResponse.java:21–23
基于官方固定版本源码静态生成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.