add test case for error response