But IMHO, the context of the error (the event where the error happened) is more important. I'm not sure if you guys have different thoughts in mind but I propose that we pass the whole error to the callback instead of the error cause.
I can add a PR to address this if you guys want to proceed with it
Context
Currently we can configure the event processors errors monitor using
config.on_event_processor_error
.The callback accepts the
exception
which just contains the error cause instead of an instance ofEventSourcery::EventProcessingError
, please see: https://github.com/envato/event_sourcery/blob/master/lib/event_sourcery/event_processing/error_handlers/error_handler.rb#L18But IMHO, the context of the error (the event where the error happened) is more important. I'm not sure if you guys have different thoughts in mind but I propose that we pass the whole error to the callback instead of the error cause.
I can add a PR to address this if you guys want to proceed with it