类 JSONRPCError

java.lang.Object
io.github.a2ap.core.jsonrpc.JSONRPCError

public class JSONRPCError extends Object
Represents a JSON-RPC 2.0 error object as defined in the JSON-RPC specification. This class encapsulates error information returned in JSON-RPC responses when a request cannot be processed successfully. It includes both standard JSON-RPC error codes and A2A protocol-specific error codes. Standard JSON-RPC error codes (as per specification): - PARSE_ERROR (-32700): Invalid JSON was received - INVALID_REQUEST (-32600): The JSON sent is not a valid Request object - METHOD_NOT_FOUND (-32601): The method does not exist or is not available - INVALID_PARAMS (-32602): Invalid method parameter(s) - INTERNAL_ERROR (-32603): Internal JSON-RPC error A2A protocol-specific error codes: - TASK_NOT_FOUND (-32000): Requested task does not exist - AUTHENTICATION_FAILED (-32001): Authentication credentials are invalid - PUSH_NOTIFICATION_NOT_SUPPORTED (-32002): Push notifications are not supported The error object may include additional data to provide more context about the specific error condition.
  • 字段详细资料

    • PARSE_ERROR

      public static final int PARSE_ERROR
      另请参阅:
    • INVALID_REQUEST

      public static final int INVALID_REQUEST
      另请参阅:
    • METHOD_NOT_FOUND

      public static final int METHOD_NOT_FOUND
      另请参阅:
    • INVALID_PARAMS

      public static final int INVALID_PARAMS
      另请参阅:
    • INTERNAL_ERROR

      public static final int INTERNAL_ERROR
      另请参阅:
    • TASK_NOT_FOUND

      public static final int TASK_NOT_FOUND
      另请参阅:
    • AUTHENTICATION_FAILED

      public static final int AUTHENTICATION_FAILED
      另请参阅:
    • PUSH_NOTIFICATION_NOT_SUPPORTED

      public static final int PUSH_NOTIFICATION_NOT_SUPPORTED
      另请参阅:
  • 构造器详细资料

    • JSONRPCError

      public JSONRPCError()
    • JSONRPCError

      public JSONRPCError(int code, String message, Object data)
  • 方法详细资料

    • builder

      public static JSONRPCError.Builder builder()
    • getCode

      public int getCode()
    • setCode

      public void setCode(int code)
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
    • getData

      public Object getData()
    • setData

      public void setData(Object data)
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object