added test case for error