add test for error