lib/bbcloud/cloud_ips.rb in bbcloud-0.8 vs lib/bbcloud/cloud_ips.rb in bbcloud-0.8.1
- old
+ new
@@ -8,10 +8,10 @@
conn.cloud_ips
end
def self.create
r = conn.create_cloud_ip
- new(JSON.parse(r.body)["id"])
+ new(r["id"])
rescue Excon::Errors::Forbidden => e
response = JSON.parse(e.response.body) rescue {}
response = response.fetch("error", {})
raise Forbidden, "#{response["details"]}: #{response["summary"]}"
end