Response.Error_codeStandard JSON-RPC 2.0 error codes.
These codes follow the JSON-RPC 2.0 specification for structured error responses. Using the typed codes instead of raw integers improves code clarity and prevents typos. Polymorphic variants allow for easy extension.
type t = [ | `Parse_error-32700: Invalid JSON received
*)| `Invalid_request-32600: The request object is invalid
*)| `Method_not_found-32601: The requested method does not exist
*)| `Invalid_params-32602: Invalid method parameters
*)| `Internal_error-32603: Internal server error
*)| `Custom of intApplication-specific error codes
*) ]val to_int : [< t ] -> intto_int t converts an error code to its integer representation.
val of_int : int -> tof_int n converts an integer to an error code. Standard codes are mapped to their variants, others become `Custom n.