def handle_failed_indicators(self, indicator_list, response_json):
        """Handle failed indicators by writing them to a new file or ingesting them into a log table.

        Args:
            indicator_list (list): List of indicators.
            response_json (dict): JSON response including errors.
        """
        __method_name = inspect.currentframe().f_code.co_name
        try:
            record_indexes = [error.get("recordIndex") for error in response_json["errors"]]
            failed_indicators = [indicator_list[index] for index in record_indexes]

            # LOGIC TO WRITE FAILED INDICATORS IN NEW FILE
            if self.azure_function_name == consts.INDICATOR_FUNCTION_NAME:
                applogger.info(
                    self.log_format.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.azure_function_name,
                        "Writing Failed Indicators to new file.",
                    )
                )
                file_timestamp = time.time()
                failed_file_name = "infoblox_failed_tide_indicators_file_{}".format(str(int(file_timestamp)))
                failed_indicator_file_obj = StateManager(
                    consts.CONN_STRING, failed_file_name, consts.FILE_SHARE_NAME_DATA
                )
                self.post_checkpoint_data(failed_indicator_file_obj, failed_indicators, dump_flag=True)
            elif self.azure_function_name == consts.FAILED_INDICATOR_FUNCTION_NAME:
                applogger.info(
                    self.log_format.format(
                        consts.LOGS_STARTS_WITH,
                        __method_name,
                        self.azure_function_name,
                        "Ingesting Failed Indicators to Log Table.",
                    )
                )
                post_data(
                    body=json.dumps(failed_indicators, ensure_ascii=False),
                    log_type=consts.FAILED_INDICATORS_TABLE_NAME,
                )
        except KeyError as keyerror:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    "Key error : Error-{}".format(keyerror),
                )
            )
            raise InfobloxException()
        except InfobloxException:
            raise InfobloxException()
        except Exception as error:
            applogger.error(
                self.log_format.format(
                    consts.LOGS_STARTS_WITH,
                    __method_name,
                    self.azure_function_name,
                    consts.UNEXPECTED_ERROR_MSG.format(error),
                )
            )
            raise InfobloxException()
Handle failed indicators by writing them to a new file or ingesting them into a log table.

        Args:
            indicator_list (list): List of indicators.
            response_json (dict): JSON response including errors.
        
Solutions/Infoblox/Data Connectors/InfobloxCloudDataConnector/SharedCode/utils.py