snatch-dev/Chronicle

Compensate exception handling and ILogger<> to Chronicle Builder

Opened this issue · 0 comments

https://github.com/chronicle-stack/Chronicle/blob/128bdeb31efc4e1deaf9e709fe2be916b8a04e44/src/Chronicle/Managers/SagaPostProcessor.cs#L42

When an exception gets thrown in a HandleAsync(), the saga is rejected. Do you think there is a preferred way of handling an unhandled exception thrown from a CompensateAsync() method that would allow the saga to be recovered and continue compensations at a later date?

Maybe update the log to maintain a status of successfully executed compensations and an additional state of 'RejectCompleted'?

Either way, I'm going to start considering adding an optional UseLogging(ILogger<>) to the ChronicleBuilder and expand on logging.