add test for errored documents