ApiErrorDetail
@JsonInclude(JsonInclude.Include.NON_NULL) public record ApiErrorDetail( String type, String code, String message, String param, @JsonProperty("session_id") String sessionId, @JsonProperty("retry_status") String retryStatus)
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66承载 API 错误详情数据的记录类型。位于 io.agentscope.builder.web.api.error 包。核心成员包括 type、code、message、param、sessionId、retryStatus。
Shared typed error object for HTTP responses and session.error payloads.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
type | String | 执行类型相关操作。 Performs the type operation. |
code | String | 执行 `code` 方法。 Performs the code operation. |
message | String | 执行消息相关操作。 Performs the message operation. |
param | String | 执行参数相关操作。 Performs the param operation. |
sessionId | String | 执行会话标识相关操作。 Performs the session id operation. |
retryStatus | String | 执行重试状态相关操作。 Performs the retry status operation. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static ApiErrorDetail of(ApiErrorType type, String code, String message)static | 创建并返回实例。 Creates and returns an instance. |
public ApiErrorDetail withParam(String param) | 执行使用参数相关操作。 Performs the with param operation. |
public ApiErrorDetail withSessionId(String sessionId) | 执行使用会话标识相关操作。 Performs the with session id operation. |
public ApiErrorDetail withRetryStatus(String retryStatus) | 执行使用重试状态相关操作。 Performs the with retry status operation. |
public Map<String, Object> toMap() | 返回到映射。 Flattens into a payload map suitable for `session.error`. |
记录组件详情Record Component Detail
type
String type执行类型相关操作。
Performs the type operation.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66code
String code执行 code 方法。
Performs the code operation.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66message
String message执行消息相关操作。
Performs the message operation.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66param
String param执行参数相关操作。
Performs the param operation.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66sessionId
String sessionId执行会话标识相关操作。
Performs the session id operation.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66retryStatus
String retryStatus执行重试状态相关操作。
Performs the retry status operation.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:24–66方法详情Method Detail
of
public static ApiErrorDetail of(ApiErrorType type, String code, String message)
static
创建并返回实例。
Creates and returns an instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
type | ApiErrorType | 类型(类型 `ApiErrorType`)。The type. |
code | String | code(类型 `String`)。The code. |
message | String | 消息(类型 `String`)。The message. |
ApiErrorDetail返回ApiErrorDetail。Returns api error detail.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:33–35withParam
public ApiErrorDetail withParam(String param)
执行使用参数相关操作。
Performs the with param operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
param | String | 参数(类型 `String`)。The param. |
ApiErrorDetail返回ApiErrorDetail。Returns api error detail.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:37–39withSessionId
public ApiErrorDetail withSessionId(String sessionId)
执行使用会话标识相关操作。
Performs the with session id operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
ApiErrorDetail返回ApiErrorDetail。Returns api error detail.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:41–43withRetryStatus
public ApiErrorDetail withRetryStatus(String retryStatus)
执行使用重试状态相关操作。
Performs the with retry status operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
retryStatus | String | 重试状态(类型 `String`)。The retry status. |
ApiErrorDetail返回ApiErrorDetail。Returns api error detail.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:45–47toMap
public Map<String, Object> toMap()
返回到映射。
Flattens into a payload map suitable for session.error.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/builder/web/api/error/ApiErrorDetail.java:50–65