For me, it turns out that I was trying to insert a group of records using applyBatch, but one of the later records depended on an earlier record in the group being inserted correctly, which it wasn't (it failed).
I identified the error by doing "applyBatch" with each of the ContentOperations, one at a time. Then i could easily see why it was failing.
Note that this post was helpful in figuring out the problem.