Handle error appropriately during the BTree writes.