fog / fog-openstack

Fog for OpenStack Platform
MIT License
68 stars 130 forks source link

Volume API uses Fog::Compute::OpenStack::NotFound exception class #48

Open plribeiro3000 opened 8 years ago

plribeiro3000 commented 8 years ago

lib/fog/openstack/volume.rb#L177 has what is probably just a copy-paste error:

rescue Excon::Errors::HTTPStatusError => error
  raise case error
  when Excon::Errors::NotFound
    Fog::Compute::OpenStack::NotFound.slurp(error)
  else
    error
  end

That custom exception class should be Fog::Volume::OpenStack::NotFound.(with Volume instead of Compute). Since that class already exists and is used in a few other places, I don't see an easy way to fix that in a backwards-compatible way. So it should at least be noted and fixed when backwards compatibility is broken the next time.

Original issue opened by @majewsky at fog/fog#3618

plribeiro3000 commented 8 years ago

cc/ @majewsky @TerryHowe @geemus @MaPoCaCe