def METHOD_NAME(service, monkeypatch):
    """
    The search endpoint should succeed even if something goes wrong with the save-result step.
    """
    monkeypatch.setattr(Crawler, "attempt_login", mock_login("Successful login response"))
    monkeypatch.setattr(Crawler, "search", mock_search(service, "john_doe"))
    service.client.post(
        "/api/oeci_login", json={"oeci_username": "correctusername", "oeci_password": "correctpassword"}
    )
    assert service.client.cookie_jar._cookies["localhost.local"]["/"]["oeci_token"]
    response = service.client.post("/api/search", json=service.search_request_data)
    assert response.status_code == 200
    data = json.loads(response.data)
    check_response_record_matches_mock_crawler_search(data["record"], service.mock_record["john_doe"])