added rescue message to GET request
This commit is contained in:
parent
80317f31a5
commit
bb93a5bb1f
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue