I'm currently about to implement saga pattern in my NestJS application for transaction Specific Mongodb, Grpc,
I already read some documentation about saga in NestJs in their documentation. But I need some examples of how to do compensating transaction in case of failure in any step of the saga. Should I handle it using try catch? or whatever? I'm not really sure, there is no example of handling compensating transaction in the documentation.
It would be very helpful if anyone can show be the best practice of how should i do it.
Please help me to resolve problem.