chef-server-api 0.10.0.beta.0 → 0.10.0.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,6 +41,14 @@ class Search < Application
41
41
  end
42
42
  params[:type] = params.delete(:id)
43
43
  display(Chef::SolrQuery.from_params(params).search)
44
+ rescue Chef::Exceptions::QueryParseError => e
45
+ # we set status rather than raising BadRequest to avoid a
46
+ # stacktrace in the server log
47
+ self.status = 400
48
+ e_msg = e.message.gsub(/\n/, " ")
49
+ msg = "invalid search query: '#{params[:q]}' #{e_msg}"
50
+ Chef::Log.warn("400 #{msg}")
51
+ display({ "error" => [msg] })
44
52
  end
45
53
 
46
54
  def reindex
@@ -1,3 +1,3 @@
1
1
  module ChefServerApi
2
- VERSION = '0.10.0.beta.0'
2
+ VERSION = '0.10.0.beta.1'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: chef-server-api
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 7
5
- version: 0.10.0.beta.0
5
+ version: 0.10.0.beta.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Opscode
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-28 00:00:00 -07:00
13
+ date: 2011-03-29 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency