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:
parent
d37397becc
commit
d090b86d6a
2 changed files with 2 additions and 2 deletions
|
@ -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'])
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue