Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
transaction and return the data as it is. The second argument is an error handler and is run when controller throws exception. In that function, we ROLLBACK as the API call simply failed and throw the error. Last argument which is the finalize method will always be executed. We use that function to