adding e2e test cases for error handling