← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1283876] [NEW] webob.exc.HTTPUnprocessableEntity can't return correct messages

 

Public bug reported:

In nova/api/openstack/compute/contrib/services.py there are codes like:

190             if id == "disable-log-reason":
191                 reason = body['disabled_reason']
192                 if not self._is_valid_as_reason(reason):
193                     msg = _('The string containing the reason for disabling '
194                             'the service contains invalid characters or is '
195                             'too long.')
196                     raise webob.exc.HTTPUnprocessableEntity(detail=msg)

But HTTPUnprocessableEntity should use 'explanation' parameter to return
the error message.

The source can be referred here:

https://github.com/Pylons/webob/blob/master/webob/exc.py#L885

** Affects: nova
     Importance: Undecided
     Assignee: Haiwei Xu (xu-haiwei)
         Status: In Progress

** Changed in: nova
     Assignee: (unassigned) => Haiwei Xu (xu-haiwei)

** Changed in: nova
       Status: New => In Progress

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

Title:
  webob.exc.HTTPUnprocessableEntity can't return correct messages

Status in OpenStack Compute (Nova):
  In Progress

Bug description:
  In nova/api/openstack/compute/contrib/services.py there are codes
  like:

  190             if id == "disable-log-reason":
  191                 reason = body['disabled_reason']
  192                 if not self._is_valid_as_reason(reason):
  193                     msg = _('The string containing the reason for disabling '
  194                             'the service contains invalid characters or is '
  195                             'too long.')
  196                     raise webob.exc.HTTPUnprocessableEntity(detail=msg)

  But HTTPUnprocessableEntity should use 'explanation' parameter to
  return the error message.

  The source can be referred here:

  https://github.com/Pylons/webob/blob/master/webob/exc.py#L885

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


Follow ups

References