Updated openstack/openstack
Project: openstack/nova  cd6850181119195bc988c828254342ef99262400

Handle invalid sort keys/dirs gracefully

If an invalid sort key or sort direction is supplied on a GET servers
REST API call, the 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.

paginate_query raises oslo.db.exception.InvalidSortKey for an invalid
sort key and raises a ValueError for an invalid sort direction.

Change-Id: I42ceaa461ddbf33dde44355d0cb0fb752c361f2f
Closes-Bug: 1403230