diff --git a/lib/fluent/plugin/in_exec.rb b/lib/fluent/plugin/in_exec.rb
index <HASH>..<HASH> 100644
--- a/lib/fluent/plugin/in_exec.rb
+++ b/lib/fluent/plugin/in_exec.rb
@@ -98,7 +98,7 @@ module Fluent::Plugin
       router.emit(tag, time, record)
     rescue => e
       log.error "exec failed to emit", tag: tag, record: Yajl.dump(record), error: e
-      router.emit_error_event(tag, time, record, "exec failed to emit")
+      router.emit_error_event(tag, time, record, e) if tag && time && record
     end
   end
 end
diff --git a/lib/fluent/plugin/out_exec_filter.rb b/lib/fluent/plugin/out_exec_filter.rb
index <HASH>..<HASH> 100644
--- a/lib/fluent/plugin/out_exec_filter.rb
+++ b/lib/fluent/plugin/out_exec_filter.rb
@@ -305,7 +305,7 @@ module Fluent::Plugin
         log.error_backtrace e.backtrace
         @next_log_time = Time.now.to_i + @suppress_error_log_interval
       end
-      router.emit_error_event(tag, time, record, "exec_filter failed to emit") if tag && time && record
+      router.emit_error_event(tag, time, record, e) if tag && time && record
     end
   end
 end
fix to pass error object into error stream