writes to doc during transaction but causes an exception.
can't resolve exception.