https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
*,
    task_instance: TaskInstance | TaskInstancePydantic,
    exception: BaseException,
    task: BaseOperator | None = None,
) -> tuple[str, str, str]:
    """
    Get the email subject content for exceptions.
    :param task_instance: the task instance
    :param exception: the exception sent in the email
    :param task:
    :meta private:
    """
    
    if task is None:
        task = getattr(task_instance, "task")
    use_default = task is None
    exception_html = str(exception).replace("\n", "<br>")
    default_subject = "Airflow alert: {{ti}}"