类 A2AError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.a2ap.core.exception.A2AError
- 所有已实现的接口:
Serializable
Exception class for A2A protocol errors.
This exception contains error codes, additional data, and task-specific information
to provide comprehensive error context in A2A protocol communications.
- 另请参阅:
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static final intAgent execution error codestatic final intAuthentication error codestatic final intAuthorization error codestatic final intInvalid parameters error codestatic final intMethod not found error codestatic final intTask already cancelled error codestatic final intTask not found error code -
构造器概要
构造器构造器说明A2AError()Default constructorConstructor with messageConstructor with all propertiesConstructor with all propertiesConstructor with message and causeConstructor with all properties and cause -
方法概要
-
字段详细资料
-
INVALID_PARAMS
public static final int INVALID_PARAMSInvalid parameters error code- 另请参阅:
-
METHOD_NOT_FOUND
public static final int METHOD_NOT_FOUNDMethod not found error code- 另请参阅:
-
TASK_NOT_FOUND
public static final int TASK_NOT_FOUNDTask not found error code- 另请参阅:
-
TASK_CANCELLED
public static final int TASK_CANCELLEDTask already cancelled error code- 另请参阅:
-
AGENT_EXECUTION_ERROR
public static final int AGENT_EXECUTION_ERRORAgent execution error code- 另请参阅:
-
AUTHENTICATION_ERROR
public static final int AUTHENTICATION_ERRORAuthentication error code- 另请参阅:
-
AUTHORIZATION_ERROR
public static final int AUTHORIZATION_ERRORAuthorization error code- 另请参阅:
-
-
构造器详细资料
-
A2AError
public A2AError()Default constructor -
A2AError
Constructor with message- 参数:
message- The error message
-
A2AError
Constructor with message and cause- 参数:
message- The error messagecause- The cause
-
A2AError
Constructor with all properties- 参数:
message- The error messagecode- The error codedata- Additional datataskId- The task ID
-
A2AError
Constructor with all properties- 参数:
message- The error messagecode- The error codedata- Additional data
-
A2AError
Constructor with all properties and cause- 参数:
message- The error messagecause- The causecode- The error codedata- Additional datataskId- The task ID
-
-
方法详细资料
-
getCode
public int getCode()Gets the error code- 返回:
- The error code
-
setCode
public void setCode(int code) Sets the error code- 参数:
code- The error code to set
-
getData
Gets the additional data- 返回:
- The additional data
-
setData
Sets the additional data- 参数:
data- The additional data to set
-
getTaskId
Gets the task ID- 返回:
- The task ID
-
setTaskId
Sets the task ID- 参数:
taskId- The task ID to set
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
Returns a builder for A2AError- 返回:
- A new builder instance
-