Class JsonRpcError

java.lang.Object
com.github.copilot.sdk.json.JsonRpcError

public final class JsonRpcError extends Object
JSON-RPC 2.0 error structure.

This is an internal class representing an error in a JSON-RPC response. It contains an error code, message, and optional additional data.

Standard Error Codes

  • -32700: Parse error
  • -32600: Invalid Request
  • -32601: Method not found
  • -32602: Invalid params
  • -32603: Internal error
Since:
1.0.0
See Also:
  • Constructor Details

    • JsonRpcError

      public JsonRpcError()
  • Method Details

    • getCode

      public int getCode()
      Gets the error code.
      Returns:
      the integer error code
    • setCode

      public void setCode(int code)
      Sets the error code.
      Parameters:
      code - the integer error code
    • getMessage

      public String getMessage()
      Gets the error message.
      Returns:
      the human-readable error message
    • setMessage

      public void setMessage(String message)
      Sets the error message.
      Parameters:
      message - the error message
    • getData

      public Object getData()
      Gets the additional error data.
      Returns:
      the additional data, or null if none
    • setData

      public void setData(Object data)
      Sets the additional error data.
      Parameters:
      data - the additional data