Internal Server Error raised when passing invalid query for searching

Bug #1528472 reported by Liyingjun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
Medium
Liyingjun

Bug Description

curl -H "X-Auth-Token: $1" -d '{"all_projects": true, "query": {}}' http://127.0.0.1:9393/v1/search

<html>
 <head>
  <title>500 Internal Server Error</title>
 </head>
 <body>
  <h1>500 Internal Server Error</h1>
  The server has either erred or is incapable of performing the requested operation.<br /><br />

 </body>
</html>

It should be a bad request.

Liyingjun (liyingjun)
Changed in searchlight:
assignee: nobody → Liyingjun (liyingjun)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to searchlight (master)

Fix proposed to branch: master
Review: https://review.openstack.org/260391

Changed in searchlight:
status: New → In Progress
Changed in searchlight:
milestone: none → mitaka-2
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to searchlight (master)

Reviewed: https://review.openstack.org/260391
Committed: https://git.openstack.org/cgit/openstack/searchlight/commit/?id=079b50e322a55891abdcd5eea809b1d4198d50a2
Submitter: Jenkins
Branch: master

commit 079b50e322a55891abdcd5eea809b1d4198d50a2
Author: liyingjun <email address hidden>
Date: Thu Dec 3 00:35:15 2015 +0800

    Raise HTTPBadRequest when passing invalid query to search api

    Currently, Internal Server Error raised when passing invalid
    query for searching which makes user confusing. Raise
    HTTPBadRequest instead in the case.

    Change-Id: I242d87b6c63a09b3e4113e8c7f67ae6d6abeabf3
    Closes-bug: #1528472

Changed in searchlight:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.