fixed handling of failed commit in user-provided unit of work