Use HTTParty handy predicate methods on node status service

parent 1005e2c4
......@@ -15,7 +15,7 @@ module Geo
'PRIVATE-TOKEN' => private_token
})
if response.code >= 200 && response.code < 300
if response.success? || response.redirection?
response.parsed_response.values_at(*keys)
else
["Could not connect to Geo node - HTTP Status Code: #{response.code}"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment