add test case for error