lib/chef/knife/joyent_fw_create.rb in knife-joyent-0.4.0 vs lib/chef/knife/joyent_fw_create.rb in knife-joyent-0.4.1

- old
+ new

@@ -32,17 +32,19 @@ "rule" => config[:rule], } ) unless res.status == 201 - output_error_response(res) + output_error(res) else r = res.body ui.info "Created Firewall Rule: #{r["id"]}" msg_pair "RULE", r["rule"] msg_pair "ENABLED", (r["enabled"] ? ui.color("✓ YES", :cyan) : "✗ NO") end + rescue => e + output_error(e) end end end end