← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1281904] Re: Wrong exception type HTTPBadRequest is raised

 

** Changed in: nova
       Status: Fix Committed => Fix Released

-- 
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/1281904

Title:
  Wrong exception type HTTPBadRequest is raised

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When user without admin permission wants to get a list of servers
  which are in 'deleted' state, currently it raises HTTPBadRequest.

  The code is:

   231         if search_opts.get("vm_state") == ['deleted']:
   232             if context.is_admin:
   233                 search_opts['deleted'] = True
   234             else:
   235                 msg = _("Only administrators may list deleted instances")
   236                 raise exc.HTTPBadRequest(explanation=msg)

  This should be changed to HTTPForbidden exception.

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


References