added tests to check if ErrorResponse is hit