add test for errors