Class InvalidAgentResponseError_v0_3
java.lang.Object
java.lang.Throwable
java.lang.Error
org.a2aproject.sdk.compat03.spec.JSONRPCError_v0_3
org.a2aproject.sdk.compat03.spec.InvalidAgentResponseError_v0_3
- All Implemented Interfaces:
Serializable, A2AError_v0_3, Event_v0_3
A2A Protocol error indicating that an agent returned a response not conforming to protocol specifications.
This error is typically raised by client implementations when validating agent responses. It indicates that the agent's response structure, content, or format violates the A2A Protocol requirements for the invoked method.
Common violations:
- Missing required fields in response objects
- Invalid field types or values
- Malformed event stream data
- Response doesn't match declared agent capabilities
Corresponds to A2A-specific error code -32006.
Usage example:
SendMessageResponse response = client.sendMessage(request);
if (response.task() == null) {
throw new InvalidAgentResponseError(
null,
"Response missing required 'task' field",
null
);
}
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class JSONRPCError_v0_3
getCode, getDataMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
DEFAULT_CODE
-
-
Constructor Details
-
InvalidAgentResponseError_v0_3
-