Exception: Solana::Ruby::Kit::Rpc::RpcError

Inherits:
StandardError
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/solana/ruby/kit/rpc/transport.rb

Overview

JSON-RPC error returned by the Solana node.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message, data = nil) ⇒ RpcError

Returns a new instance of RpcError.



22
23
24
25
26
# File 'lib/solana/ruby/kit/rpc/transport.rb', line 22

def initialize(code, message, data = nil)
  @code = T.let(code, Integer)
  @data = T.let(data, T.untyped)
  super("JSON-RPC error #{code}: #{message}")
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



16
17
18
# File 'lib/solana/ruby/kit/rpc/transport.rb', line 16

def code
  @code
end

#dataObject (readonly)

Returns the value of attribute data.



19
20
21
# File 'lib/solana/ruby/kit/rpc/transport.rb', line 19

def data
  @data
end