diff --git a/lib/fog/google/compute.rb b/lib/fog/google/compute.rb index 0650ec519..973ce69c4 100644 --- a/lib/fog/google/compute.rb +++ b/lib/fog/google/compute.rb @@ -124,6 +124,11 @@ module Fog response.body = Fog::JSON.decode(result.body) if response.body["error"] response.status = response.body["error"]["code"] + + response.body["error"]["errors"].each do |error| + # We could throw these I guess. + p Fog::Errors::Error.new(error) + end else response.status = 200 end diff --git a/lib/fog/google/models/compute/server.rb b/lib/fog/google/models/compute/server.rb index 7b188913f..89ac578c8 100644 --- a/lib/fog/google/models/compute/server.rb +++ b/lib/fog/google/models/compute/server.rb @@ -44,7 +44,6 @@ module Fog def ready? data = service.get_server(self.name, self.zone_name).body - p data data['zone_name'] = self.zone_name self.merge_attributes(data) @@ -67,6 +66,8 @@ module Fog zone_name, machine_type) + p data + data = service.get_server(self.name, self.zone_name).body service.servers.merge_attributes(data) end