def METHOD_NAME(self) -> None:
    exp_summary = self.create_model(
        exp_models.ExpSummaryModel,
        id='abcd',
        deleted=False,
        title='title',
        category='category',
        objective='objective',
        language_code='lang',
        community_owned=False,
        status=constants.ACTIVITY_STATUS_PUBLIC
    )
    exp_summary.update_timestamps()
    exp_summary.put()
    def add_docs_to_index_mock(
            unused_documents: Dict[str, Union[int, str, List[str]]],
            unused_index_name: str
    ) -> None:
        raise platform_search_services.SearchException('search exception')
    add_docs_to_index_swap = self.swap_with_checks(
        platform_search_services,
        'add_documents_to_index',
        add_docs_to_index_mock,
        expected_args=[
            (
                [{
                    'id': 'abcd',
                    'language_code': 'lang',
                    'title': 'title',
                    'category': 'category',
                    'tags': [],
                    'objective': 'objective',
                    'rank': 20,
                }],
                search_services.SEARCH_INDEX_EXPLORATIONS
            )
        ]
    )
    with add_docs_to_index_swap:
        self.assert_job_output_is([
            job_run_result.JobRunResult.as_stderr(
                'ERROR: "search exception": 1'
            )
        ])