← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1279189] [NEW] delete or query an not exist snapshot raise exception more readable

 

Public bug reported:

In V2 API layer code, it would be better if we raise exception instead
of return it

try:
            self.volume_api.delete_snapshot(context, id)
        except exception.NotFound:
            return exc.HTTPNotFound()  ----> use raise instead of return

** Affects: nova
     Importance: Undecided
     Assignee: jichencom (jichenjc)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => jichencom (jichenjc)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1279189

Title:
  delete or query an not exist snapshot raise exception more readable

Status in OpenStack Compute (Nova):
  New

Bug description:
  In V2 API layer code, it would be better if we raise exception instead
  of return it

  try:
              self.volume_api.delete_snapshot(context, id)
          except exception.NotFound:
              return exc.HTTPNotFound()  ----> use raise instead of return

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1279189/+subscriptions


Follow ups

References