← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1403230] [NEW] GET server API does not handle invalid sort keys or directions gracefully

 

Public bug reported:

If an invalid sort key or sort direction is given the REST API returns
an error code 500 with the "The server has either erred or is incapable
of performing the requested operation." message.

This is occurring because the exceptions raised in
oslo.db.sqlalchemy.utils.paginate_query are not caught and handled in
nova.

Exception raised here:
https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/utils.py#L147
https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/utils.py#L152

The error raised in this scenario should be more specific.

** Affects: nova
     Importance: Undecided
         Status: New

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

Title:
  GET server API does not handle invalid sort keys or directions
  gracefully

Status in OpenStack Compute (Nova):
  New

Bug description:
  If an invalid sort key or sort direction is given the REST API returns
  an error code 500 with the "The server has either erred or is
  incapable of performing the requested operation." message.

  This is occurring because the exceptions raised in
  oslo.db.sqlalchemy.utils.paginate_query are not caught and handled in
  nova.

  Exception raised here:
  https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/utils.py#L147
  https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/utils.py#L152

  The error raised in this scenario should be more specific.

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


Follow ups

References