Permalink
Browse files

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

…create
  • Loading branch information...
1 parent d37397b commit d090b86d6ae25215acbc1b6976b9ebdaa51552ba @splaspood splaspood committed with geemus Feb 21, 2011
@@ -14,7 +14,7 @@ def voxcloud_create( options )
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 @@ def voxcloud_delete( device_id )
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

0 comments on commit d090b86

Please sign in to comment.