We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ff88f6 commit 80c0fa0Copy full SHA for 80c0fa0
infra/lib/infra/event_store.rb
@@ -3,7 +3,7 @@ class EventStore < SimpleDelegator
3
def self.main
4
require_relative "../../../rails_application/lib/transformations/refund_to_return_event_mapper" rescue nil
5
6
- if defined?(Transformations::RefundToReturnEventMapper)
+ begin
7
mapper = RubyEventStore::Mappers::PipelineMapper.new(
8
RubyEventStore::Mappers::Pipeline.new(
9
Transformations::RefundToReturnEventMapper.new(
@@ -17,7 +17,8 @@ def self.main
17
)
18
19
client = RailsEventStore::JSONClient.new(mapper: mapper)
20
- else
+ rescue => e
21
+ puts "Mapper creation failed: #{e.message}"
22
client = RailsEventStore::JSONClient.new
23
end
24
0 commit comments