error

inline fun error(init: JSONRPCErrorBuilder<E>.() -> Unit)(source)

Builds the error inline using the JSONRPCErrorBuilder DSL.

jsonRPCResponse<Nothing, Nothing> {
id = RequestId(1)
error {
code = JSONRPCError.ErrorCodes.INTERNAL_ERROR
message = "Something went wrong"
}
}

The error object for a failed response. Mutually exclusive with result.