1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

raise NotFound when hAPI returns error on delete and simple Error on create

This commit is contained in:
James W. Brinkerhoff 2011-02-20 20:53:06 -05:00 committed by geemus
parent d37397becc
commit d090b86d6a
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ module Fog
data = request("voxel.voxcloud.create", options)
unless data['stat'] == 'ok'
raise "Error from Voxel hAPI: #{data['err']['msg']}"
raise Fog::Voxel::Compute::Error, "Error from Voxel hAPI: #{data['err']['msg']}"
end
devices_list(data['device']['id'])

View file

@ -7,7 +7,7 @@ module Fog
data = request("voxel.voxcloud.delete", options )
unless data['stat'] == 'ok'
raise "Error from Voxel hAPI: #{data['err']['msg']}"
raise Fog::Voxel::Compute::NotFound, "Error from Voxel hAPI: #{data['err']['msg']}"
end
true