Class JSONRPCErrorResponse_v0_3

java.lang.Object
org.a2aproject.sdk.compat03.spec.JSONRPCResponse_v0_3<Void>
org.a2aproject.sdk.compat03.spec.JSONRPCErrorResponse_v0_3
All Implemented Interfaces:
JSONRPCMessage_v0_3

public final class JSONRPCErrorResponse_v0_3 extends JSONRPCResponse_v0_3<Void>
A JSON RPC error response.
  • Constructor Details

    • JSONRPCErrorResponse_v0_3

      public JSONRPCErrorResponse_v0_3(String jsonrpc, Object id, Void result, JSONRPCError_v0_3 error)
      Constructs a JSON-RPC error response with all fields.

      This constructor is used for JSON deserialization.

      Parameters:
      jsonrpc - the JSON-RPC version (must be "2.0")
      id - the request ID, or null if the ID could not be determined from the request
      result - must be null for error responses
      error - the error object describing what went wrong (required)
      Throws:
      IllegalArgumentException - if error is null
    • JSONRPCErrorResponse_v0_3

      public JSONRPCErrorResponse_v0_3(Object id, JSONRPCError_v0_3 error)
    • JSONRPCErrorResponse_v0_3

      public JSONRPCErrorResponse_v0_3(JSONRPCError_v0_3 error)