opscode/chef-zero — pull request #101 by stevendanna (2014-11-15 18:57:29+00:00)
Title: Return HTTP 400 Bad Request on Solr parse error

Previously, chef-zero would return an HTTP 500 Internal Server Error
when the Solr parser failed. Now, we return HTTP 400 with an error
message identical to that of the Erchef server. Returning HTTP 400
also improves the end-user experience since knife returns more
sensible error messages.

Before this patch:

> knife search nodes 'recipes:bar::bar'
ERROR: Server returned error 500 for http://127.0.0.1:8889/search...

After:

> knife search nodes 'recipes:bar::bar'
ERROR: knife search failed: invalid search query: 'recipes:bar::bar'