From 76132c0314d07a336744ab518096c77057e9a6ce Mon Sep 17 00:00:00 2001 From: Roland Moriz Date: Fri, 14 Jun 2019 16:15:40 +0200 Subject: [PATCH] fix rescue of StandardError --- lib/chef/handler/datadog_chef_metrics.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/handler/datadog_chef_metrics.rb b/lib/chef/handler/datadog_chef_metrics.rb index 20d4597..adb3628 100644 --- a/lib/chef/handler/datadog_chef_metrics.rb +++ b/lib/chef/handler/datadog_chef_metrics.rb @@ -50,6 +50,6 @@ def emit_to_datadog(dog) rescue Errno::ECONNREFUSED, Errno::ETIMEDOUT => e Chef::Log.warn("Could not send metrics to Datadog. Connection error:\n" + e) rescue StandardError => e - Chef::Log.warn("Could not determine whether chef run metrics were successfully submitted to Datadog: #{evt}. Error:\n#{e}") + Chef::Log.warn("Could not determine whether chef run metrics were successfully submitted to Datadog. Error:\n#{e}") end end # end class DatadogChefMetrics