lib/blurb/request.rb in blurb-0.5.8 vs lib/blurb/request.rb in blurb-0.5.9
- old
+ new
@@ -48,10 +48,14 @@
raise InvalidReportRequest.new(JSON.parse(err.response.body))
else
raise err
end
rescue RestClient::ExceptionWithResponse => err
- raise FailedRequest.new(JSON.parse(err.response.body))
+ if err.response.present?
+ raise FailedRequest.new(JSON.parse(err.response.body))
+ else
+ raise err
+ end
end
resp = convert_response(resp)
return resp
end