Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openstack] Volume API uses Fog::Compute::OpenStack::NotFound exception class #3618

Closed
majewsky opened this issue Jul 3, 2015 · 5 comments
Closed

Comments

@majewsky
Copy link

majewsky commented Jul 3, 2015

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.

@TerryHowe
Copy link
Contributor

Too bad there isn't a Fog::OpenStack::NotFound

@geemus
Copy link
Member

geemus commented Jul 7, 2015

I guess you could raise it but make it a subclass of excon not found, but that seems pretty weird/bad also.

@Carthaca
Copy link
Contributor

I noticed this copy-paste error also in the following services: baremetal, image, metering, orchestration and planning

@geemus
Copy link
Member

geemus commented Aug 7, 2015

@d063130 good eye, we'll try to fix those as well when we make the change.

@plribeiro3000
Copy link
Member

Closing in favor of fog/fog-openstack#48

@fog fog locked and limited conversation to collaborators Mar 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants