Class JSONRPCError_v0_3

java.lang.Object
java.lang.Throwable
java.lang.Error
org.a2aproject.sdk.compat03.spec.JSONRPCError_v0_3
All Implemented Interfaces:
Serializable, A2AError_v0_3, Event_v0_3
Direct Known Subclasses:
AuthenticatedExtendedCardNotConfiguredError_v0_3, ContentTypeNotSupportedError_v0_3, InternalError_v0_3, InvalidAgentResponseError_v0_3, InvalidParamsError_v0_3, InvalidRequestError_v0_3, JSONParseError_v0_3, MethodNotFoundError_v0_3, PushNotificationNotSupportedError_v0_3, TaskNotCancelableError_v0_3, TaskNotFoundError_v0_3, UnsupportedOperationError_v0_3

public class JSONRPCError_v0_3 extends Error implements Event_v0_3, A2AError_v0_3
Represents a JSON-RPC 2.0 Error object, included in an error response.
See Also:
  • Constructor Details

    • JSONRPCError_v0_3

      public JSONRPCError_v0_3(Integer code, String message, Object data)
      Constructs a JSON-RPC error with the specified code, message, and optional data.

      This constructor is used by Jackson for JSON deserialization.

      Parameters:
      code - the numeric error code (required, see JSON-RPC 2.0 spec for standard codes)
      message - the human-readable error message (required)
      data - additional error information, structure defined by the error code (optional)
      Throws:
      IllegalArgumentException - if code or message is null
  • Method Details

    • getCode

      public Integer getCode()
      Gets the error code
      Returns:
      the error code
    • getData

      public Object getData()
      Gets the data associated with the error.
      Returns:
      the data. May be null