diff options
Diffstat (limited to 'lib/chef/knife/data_bag_create.rb')
-rw-r--r-- | lib/chef/knife/data_bag_create.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/data_bag_create.rb b/lib/chef/knife/data_bag_create.rb index 563e931dca..bf90fb81b3 100644 --- a/lib/chef/knife/data_bag_create.rb +++ b/lib/chef/knife/data_bag_create.rb @@ -53,7 +53,7 @@ class Chef begin rest.get("data/#{@data_bag_name}") ui.info("Data bag #{@data_bag_name} already exists") - rescue Net::HTTPServerException => e + rescue Net::HTTPClientException => e raise unless e.to_s =~ /^404/ # if it doesn't exists, try to create it rest.post("data", { "name" => @data_bag_name }) |