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 |
|---|---|---|
type | String | 执行类型相关操作。 Performs the type operation. |
error | ApiErrorDetail | 执行错误相关操作。 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–24error
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 |
|---|---|---|
detail | ApiErrorDetail | 详情(类型 `ApiErrorDetail`)。The detail. |
ApiErrorResponse返回ApiErrorResponse。Returns api error response.
源码Source
io/agentscope/builder/web/api/error/ApiErrorResponse.java:21–23