added rescue message to GET request

This commit is contained in:
Matt Aimonetti 2009-02-26 18:44:39 -08:00
parent 80317f31a5
commit bb93a5bb1f

View file

@ -129,8 +129,12 @@ module CouchRest
JSON.parse(RestClient.put(uri, payload))
end
def get uri
def get(uri)
begin
JSON.parse(RestClient.get(uri), :max_nesting => false)
rescue => e
raise "Error while sending a GET request #{uri}\n: #{e}"
end
end
def post uri, doc = nil