Class InvalidRequestError_v0_3
java.lang.Object
java.lang.Throwable
java.lang.Error
org.a2aproject.sdk.compat03.spec.JSONRPCError_v0_3
org.a2aproject.sdk.compat03.spec.InvalidRequestError_v0_3
- All Implemented Interfaces:
Serializable, A2AError_v0_3, Event_v0_3
JSON-RPC error indicating that the request payload is not a valid JSON-RPC Request object.
This error is returned when the JSON-RPC request fails structural validation. Common causes include:
- Missing required JSON-RPC fields (jsonrpc, method, id)
- Invalid JSON-RPC version (must be "2.0")
- Malformed request structure
- Type mismatches in required fields
Corresponds to JSON-RPC 2.0 error code -32600.
Usage example:
// Default error with standard message
throw new InvalidRequestError();
// Custom error message
throw new InvalidRequestError("Missing 'method' field in request");
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInvalidRequestError_v0_3(Integer code, String message, Object data) InvalidRequestError_v0_3(String message) -
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
-
InvalidRequestError_v0_3
public InvalidRequestError_v0_3() -
InvalidRequestError_v0_3
-
InvalidRequestError_v0_3
-