I don't understand why wrapping with commit_on_success has anything to do with unanticipated errors.  I assume that if there is a successful save() call, it will perform the commit() and start a new transaction.  If there is an unanticipated error, either in the save() or anywhere else, it does nothing to the current transaction -- neither rolling it back or committing it.  So any save() calls that were successful remain pending until the next successful save(), or until the end of the overall call returns to the transaction middleware, at which point they will also be committed.  (Not that I have a problem with the functionality, just with the comment.)