lib/vra/client.rb in vmware-vra-1.5.0 vs lib/vra/client.rb in vmware-vra-1.5.1
- old
+ new
@@ -189,14 +189,14 @@
end
def raise_http_exception(caught_exception, path)
raise unless caught_exception.respond_to?(:http_code)
- if caught_exception.http_code == 404
- klass = Vra::Exception::HTTPNotFound
- else
- klass = Vra::Exception::HTTPError
- end
+ klass = if caught_exception.http_code == 404
+ Vra::Exception::HTTPNotFound
+ else
+ Vra::Exception::HTTPError
+ end
exception = klass.new(code: caught_exception.http_code,
body: caught_exception.response,
klass: caught_exception.class,
path: path)