def METHOD_NAME(session, redis):
    """Fetch if there is a tx_hash to be skipped because of continuous errors"""
    indexing_error = get_indexing_error(redis)
    if (
        isinstance(indexing_error, dict)
        and "has_consensus" in indexing_error
        and indexing_error["has_consensus"]
    ):
        num_skipped_tx = session.query(func.count(SkippedTransaction.id)).scalar()
        if num_skipped_tx >= MAX_SKIPPED_TX:
            return None
        skipped_tx = SkippedTransaction(
            blocknumber=indexing_error["blocknumber"],
            blockhash=indexing_error["blockhash"],
            txhash=indexing_error["txhash"],
        )
        session.add(skipped_tx)
        return indexing_error["txhash"]