HTTP 500 from an invalid sort_key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
Low
|
Ruby Loo |
Bug Description
If you specify an invalid sort_key, Ironic returns an HTTP 500 Internal Server Error. It would be better if it were an HTTP 400 Bad Request, with some useful message.
See related bug in the client: https:/
eg:
curl -i -X GET http://
HTTP/1.0 500 Internal Server Error
Date: Thu, 30 Apr 2015 16:34:36 GMT
Server: WSGIServer/0.1 Python/2.7.5
X-OpenStack-
X-OpenStack-
X-OpenStack-
Content-Type: application/json
Content-Length: 92
{"error_message": "{\"debuginfo\": null, \"faultcode\": \"Server\", \"faultstring\": \"\"}"}
----------------
from ironic-api:
127.0.0.1 - - [30/Apr/2015 16:32:39] "GET /v1/ports/
2015-04-30 16:34:36.425 25797 ERROR wsme.api [-] Server-side error: "". Detail:
Traceback (most recent call last):
File "/home/
result = f(self, *args, **kwargs)
File "/home/
limit, sort_key, sort_dir)
File "/home/
sort_
File "/home/
result = fn(cls, context, *args, **kwargs)
File "/home/
sort_
File "/home/
sort_key, sort_dir)
File "/home/
marker=marker, sort_dir=sort_dir)
File "/home/
raise exception.
InvalidSortKey
127.0.0.1 - - [30/Apr/2015 16:34:36] "GET /v1/ports/
Changed in ironic: | |
milestone: | none → 4.0.0 |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/179159
Review: https:/