Added another test case for APIError