@provide_session
    def error(self, session=None):
        logging.error("Recording the task instance as FAILED")
        self.state = State.FAILED
        session.merge(self)
        session.commit()
Forces the task instance's state to FAILED in the database.
dataset/ETHPy150Open airbnb/airflow/airflow/models.py/TaskInstance.error