JSONRPCError

data class JSONRPCError<out D>(val code: Int, val message: String, val data: D? = null)(source)

Represents a JSON-RPC 2.0 error object.

Type Parameters

D

The type of the optional data field carrying additional error details.

See also

Constructors

Link copied to clipboard
constructor(code: Int, message: String, data: D? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
object ErrorCodes

Well-known JSON-RPC 2.0 error codes.

Properties

Link copied to clipboard
@SerialName(value = "code")
val code: Int

The integer error code. Standard codes are defined in ErrorCodes.

Link copied to clipboard
@SerialName(value = "data")
val data: D?

Optional structured value with additional information about the error.

Link copied to clipboard
@SerialName(value = "message")
val message: String

A short human-readable description of the error.