From 4093723bcffb41a5ad8b03d8d20220417e76b801 Mon Sep 17 00:00:00 2001 From: Adam Gradowski Date: Mon, 5 May 2025 13:53:50 +0200 Subject: [PATCH 1/2] Extend component error reporting --- lib/operations/components/callback.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/operations/components/callback.rb b/lib/operations/components/callback.rb index 95643f7..ce01a2f 100644 --- a/lib/operations/components/callback.rb +++ b/lib/operations/components/callback.rb @@ -23,6 +23,7 @@ def call_entry(entry, operation_result, **context) rescue Dry::Monads::Do::Halt => e e.result rescue => e + error_reporter&.call(e) Failure(e) end From db78fd096115c1e3853c90cc44367b4dd235a4ca Mon Sep 17 00:00:00 2001 From: Adam Gradowski Date: Mon, 5 May 2025 15:14:20 +0200 Subject: [PATCH 2/2] Remove global rescue entirely --- lib/operations/components/callback.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/operations/components/callback.rb b/lib/operations/components/callback.rb index ce01a2f..eb0cdf2 100644 --- a/lib/operations/components/callback.rb +++ b/lib/operations/components/callback.rb @@ -22,9 +22,6 @@ def call_entry(entry, operation_result, **context) Success(result) rescue Dry::Monads::Do::Halt => e e.result - rescue => e - error_reporter&.call(e) - Failure(e) end def entry_result(entry, operation_result, **context)