summaryrefslogtreecommitdiff
path: root/lib/chef/data_collector
diff options
context:
space:
mode:
authorVivek Singh <vivek.singh@msystechnologies.com>2020-07-31 17:16:37 +0530
committerVivek Singh <vivek.singh@msystechnologies.com>2020-07-31 17:16:37 +0530
commit94b8f2f535632592363bc4f64b5792265344f593 (patch)
tree0b3348b69aec186e8776fba264766ee3b9bbe976 /lib/chef/data_collector
parenta0675c3219636a442c3d303cebfcd9e28ea2ebd9 (diff)
downloadchef-94b8f2f535632592363bc4f64b5792265344f593.tar.gz
Per resource error detail client run
- Add error_description to action_collection of resource based object. - Add error hash message class, message and detail to resource object. Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
Diffstat (limited to 'lib/chef/data_collector')
-rw-r--r--lib/chef/data_collector/run_end_message.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/data_collector/run_end_message.rb b/lib/chef/data_collector/run_end_message.rb
index 4bb4fe2852..c43c21e5ff 100644
--- a/lib/chef/data_collector/run_end_message.rb
+++ b/lib/chef/data_collector/run_end_message.rb
@@ -133,7 +133,15 @@ class Chef
end
hash["conditional"] = action_record.conditional.to_text if action_record.status == :skipped
- hash["error_message"] = action_record.exception.message unless action_record.exception.nil?
+
+ unless action_record.exception.nil?
+ hash["error"] = {
+ "class" => action_record.exception.class,
+ "message" => action_record.exception.message,
+ "backtrace" => action_record.exception.backtrace,
+ "description" => action_record.error_description,
+ }
+ end
hash
end