lib/sibit.rb in sibit-0.7.7 vs lib/sibit.rb in sibit-0.7.8

- old
+ new

@@ -180,10 +180,10 @@ # This method will also log the process and will validate the # response for correctness. def get_json(uri) start = Time.now res = Net::HTTP.get_response(URI('https://blockchain.info' + uri)) - raise Error, "Failed to retrieve #{uri}: #{res.code}" unless res.code == '200' + raise Error, "Failed to retrieve #{uri} (#{res.code}): #{res.body}" unless res.code == '200' info("GET #{uri}: #{res.code}/#{res.body.length}b in #{age(start)}") JSON.parse(res.body) end private