update-ref: use err argument to get error from ref_transaction_commit