Class JsonRpcError

java.lang.Object
org.apache.juneau.bean.jsonrpc.JsonRpcError

@Marshalled public class JsonRpcError extends Object
JSON-RPC 2.0 error object.
  • Constructor Details

  • Method Details

    • getCode

      public int getCode()
      Error code.
      Returns:
      The code.
    • setCode

      public JsonRpcError setCode(int value)
      Sets the error code.
      Parameters:
      value - The new value.
      Returns:
      This object (for method chaining).
    • getMessage

      public String getMessage()
      Error message.
      Returns:
      The message, or null if not set.
    • setMessage

      public JsonRpcError setMessage(String value)
      Sets the error message.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • getData

      public Object getData()
      Optional structured error data.
      Returns:
      The data, or null if not set.
    • setData

      public JsonRpcError setData(Object value)
      Sets optional structured error data.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).