summaryrefslogtreecommitdiff
path: root/lib/chef/environment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r--lib/chef/environment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb
index c40897d687..1ca035e594 100644
--- a/lib/chef/environment.rb
+++ b/lib/chef/environment.rb
@@ -275,7 +275,7 @@ class Chef
def save
begin
chef_server_rest.put("environments/#{@name}", self)
- rescue Net::HTTPServerException => e
+ rescue Net::HTTPClientException => e
raise e unless e.response.code == "404"
chef_server_rest.post("environments", self)
end