Public bug reported:

There is an Inappropriate exception for flavorRef in nova boot API

try:
            flavor_id = self._flavor_id_from_req_data(body)
        except ValueError as error:
            msg = _("Invalid flavorRef provided.")
            raise exc.HTTPBadRequest(explanation=msg)

I think it will be better for:
try:
            flavor_id = self._flavor_id_from_req_data(body)
        except ValueError as error:
            raise exc.HTTPBadRequest(explanation=error.format_message())

** Affects: nova
     Importance: Undecided
     Assignee: zhangyanzi (zhangyanzi)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => zhangyanzi (zhangyanzi)

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

Title:
  Inappropriate exception for flavorRef

Status in OpenStack Compute (Nova):
  New

Bug description:
  There is an Inappropriate exception for flavorRef in nova boot API

  try:
              flavor_id = self._flavor_id_from_req_data(body)
          except ValueError as error:
              msg = _("Invalid flavorRef provided.")
              raise exc.HTTPBadRequest(explanation=msg)

  I think it will be better for:
  try:
              flavor_id = self._flavor_id_from_req_data(body)
          except ValueError as error:
              raise exc.HTTPBadRequest(explanation=error.format_message())

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to