Skip to content

Commit 10622eb

Browse files
committed
feat: surface handler results to middleware chain
1 parent ced88f1 commit 10622eb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/leopard/message_processor.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ def base_app(handler, callbacks)
5656
lambda do |wrapper|
5757
result = execute_handler.call(wrapper, handler)
5858
process_result(wrapper, result, callbacks)
59+
result
5960
rescue StandardError => e
6061
logger.error 'Error processing message: ', e
6162
callbacks[:on_error].call(wrapper, e)
63+
Dry::Monads::Result::Failure.new(e)
6264
end
6365
end
6466

0 commit comments

Comments
 (0)