Bitcoin::RPC::BitcoinCoreClient raise TypeError when server respond with error messages, but expected to RuntimeError.
This pull-request is fix this.
@client = Bitcoin::RPC::BitcoinCoreClient.new(config)
# before
@client.getblock("INVALID_BLOCK_HASH")
> TypeError (exception class/object expected)
# after
@client.getblock("INVALID_BLOCK_HASH")
> RuntimeError ({"code"=>-8, "message"=>"blockhash must be of length 64 (not 18, for 'INVALID_BLOCK_HASH')"})
Add WebMock gem for stubbing http-request in test.
Bitcoin::RPC::BitcoinCoreClient
raiseTypeError
when server respond with error messages, but expected toRuntimeError
. This pull-request is fix this.Add WebMock gem for stubbing http-request in test.