blob: 5160ce69a7c5182d78227b968f8e83e5d2af9e05 [file] [log] [blame]
:py:mod:`airflow.exceptions`
============================
.. py:module:: airflow.exceptions
.. autoapi-nested-parse::
Exceptions used by Airflow
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.exceptions.FileSyntaxError
.. py:exception:: AirflowException
Bases: :py:obj:`Exception`
Base class for all Airflow's errors.
Each custom exception should be derived from this class.
.. py:attribute:: status_code
.. py:exception:: AirflowBadRequest
Bases: :py:obj:`AirflowException`
Raise when the application or server cannot handle the request.
.. py:attribute:: status_code
.. py:exception:: AirflowNotFoundException
Bases: :py:obj:`AirflowException`
Raise when the requested object/resource is not available in the system.
.. py:attribute:: status_code
.. py:exception:: AirflowConfigException
Bases: :py:obj:`AirflowException`
Raise when there is configuration problem.
.. py:exception:: AirflowSensorTimeout
Bases: :py:obj:`AirflowException`
Raise when there is a timeout on sensor polling.
.. py:exception:: AirflowRescheduleException(reschedule_date)
Bases: :py:obj:`AirflowException`
Raise when the task should be re-scheduled at a later time.
:param reschedule_date: The date when the task should be rescheduled
.. py:exception:: InvalidStatsNameException
Bases: :py:obj:`AirflowException`
Raise when name of the stats is invalid.
.. py:exception:: AirflowTaskTimeout
Bases: :py:obj:`AirflowException`
Raise when the task execution times-out.
.. py:exception:: AirflowWebServerTimeout
Bases: :py:obj:`AirflowException`
Raise when the web server times out.
.. py:exception:: AirflowSkipException
Bases: :py:obj:`AirflowException`
Raise when the task should be skipped
.. py:exception:: AirflowFailException
Bases: :py:obj:`AirflowException`
Raise when the task should be failed without retrying.
.. py:exception:: AirflowOptionalProviderFeatureException
Bases: :py:obj:`AirflowException`
Raise by providers when imports are missing for optional provider features.
.. py:exception:: XComNotFound(dag_id, task_id, key)
Bases: :py:obj:`AirflowException`
Raise when an XCom reference is being resolved against a non-existent XCom.
.. py:method:: __str__()
Return str(self).
.. py:exception:: UnmappableOperator
Bases: :py:obj:`AirflowException`
Raise when an operator is not implemented to be mappable.
.. py:exception:: XComForMappingNotPushed
Bases: :py:obj:`AirflowException`
Raise when a mapped downstream's dependency fails to push XCom for task mapping.
.. py:method:: __str__()
Return str(self).
.. py:exception:: UnmappableXComTypePushed(value, *values)
Bases: :py:obj:`AirflowException`
Raise when an unmappable type is pushed as a mapped downstream's dependency.
.. py:method:: __str__()
Return str(self).
.. py:exception:: UnmappableXComLengthPushed(value, max_length)
Bases: :py:obj:`AirflowException`
Raise when the pushed value is too large to map as a downstream's dependency.
.. py:method:: __str__()
Return str(self).
.. py:exception:: AirflowDagCycleException
Bases: :py:obj:`AirflowException`
Raise when there is a cycle in DAG definition.
.. py:exception:: AirflowDagDuplicatedIdException(dag_id, incoming, existing)
Bases: :py:obj:`AirflowException`
Raise when a DAG's ID is already used by another DAG.
.. py:method:: __str__()
Return str(self).
.. py:exception:: AirflowDagInconsistent
Bases: :py:obj:`AirflowException`
Raise when a DAG has inconsistent attributes.
.. py:exception:: AirflowClusterPolicyViolation
Bases: :py:obj:`AirflowException`
Raise when there is a violation of a Cluster Policy in DAG definition.
.. py:exception:: AirflowTimetableInvalid
Bases: :py:obj:`AirflowException`
Raise when a DAG has an invalid timetable.
.. py:exception:: DagNotFound
Bases: :py:obj:`AirflowNotFoundException`
Raise when a DAG is not available in the system.
.. py:exception:: DagCodeNotFound
Bases: :py:obj:`AirflowNotFoundException`
Raise when a DAG code is not available in the system.
.. py:exception:: DagRunNotFound
Bases: :py:obj:`AirflowNotFoundException`
Raise when a DAG Run is not available in the system.
.. py:exception:: DagRunAlreadyExists
Bases: :py:obj:`AirflowBadRequest`
Raise when creating a DAG run for DAG which already has DAG run entry.
.. py:exception:: DagFileExists(*args, **kwargs)
Bases: :py:obj:`AirflowBadRequest`
Raise when a DAG ID is still in DagBag i.e., DAG file is in DAG folder.
.. py:exception:: DuplicateTaskIdFound
Bases: :py:obj:`AirflowException`
Raise when a Task with duplicate task_id is defined in the same DAG.
.. py:exception:: TaskAlreadyInTaskGroup(task_id, existing_group_id, new_group_id)
Bases: :py:obj:`AirflowException`
Raise when a Task cannot be added to a TaskGroup since it already belongs to another TaskGroup.
.. py:method:: __str__()
Return str(self).
.. py:exception:: SerializationError
Bases: :py:obj:`AirflowException`
A problem occurred when trying to serialize a DAG.
.. py:exception:: ParamValidationError
Bases: :py:obj:`AirflowException`
Raise when DAG params is invalid
.. py:exception:: TaskNotFound
Bases: :py:obj:`AirflowNotFoundException`
Raise when a Task is not available in the system.
.. py:exception:: TaskInstanceNotFound
Bases: :py:obj:`AirflowNotFoundException`
Raise when a task instance is not available in the system.
.. py:exception:: PoolNotFound
Bases: :py:obj:`AirflowNotFoundException`
Raise when a Pool is not available in the system.
.. py:exception:: NoAvailablePoolSlot
Bases: :py:obj:`AirflowException`
Raise when there is not enough slots in pool.
.. py:exception:: DagConcurrencyLimitReached
Bases: :py:obj:`AirflowException`
Raise when DAG max_active_tasks limit is reached.
.. py:exception:: TaskConcurrencyLimitReached
Bases: :py:obj:`AirflowException`
Raise when task max_active_tasks limit is reached.
.. py:exception:: BackfillUnfinished(message, ti_status)
Bases: :py:obj:`AirflowException`
Raises when not all tasks succeed in backfill.
:param message: The human-readable description of the exception
:param ti_status: The information about all task statuses
.. py:class:: FileSyntaxError
Bases: :py:obj:`NamedTuple`
Information about a single error in a file.
.. py:attribute:: line_no
:annotation: :int | None
.. py:attribute:: message
:annotation: :str
.. py:method:: __str__()
Return str(self).
.. py:exception:: AirflowFileParseException(msg, file_path, parse_errors)
Bases: :py:obj:`AirflowException`
Raises when connection or variable file can not be parsed.
:param msg: The human-readable description of the exception
:param file_path: A processed file that contains errors
:param parse_errors: File syntax errors
.. py:method:: __str__()
Return str(self).
.. py:exception:: ConnectionNotUnique
Bases: :py:obj:`AirflowException`
Raise when multiple values are found for the same connection ID.
.. py:exception:: TaskDeferred(*, trigger, method_name, kwargs = None, timeout = None)
Bases: :py:obj:`BaseException`
Special exception raised to signal that the operator it was raised from
wishes to defer until a trigger fires.
.. py:method:: __repr__()
Return repr(self).
.. py:exception:: TaskDeferralError
Bases: :py:obj:`AirflowException`
Raised when a task failed during deferral for some reason.
.. py:exception:: PodReconciliationError
Bases: :py:obj:`AirflowException`
Raised when an error is encountered while trying to merge pod configs.
.. py:exception:: RemovedInAirflow3Warning
Bases: :py:obj:`DeprecationWarning`
Issued for usage of deprecated features that will be removed in Airflow3.
.. py:attribute:: deprecated_since
:annotation: :str | None
Indicates the airflow version that started raising this deprecation warning
.. py:exception:: AirflowProviderDeprecationWarning
Bases: :py:obj:`DeprecationWarning`
Issued for usage of deprecated features of Airflow provider.
.. py:attribute:: deprecated_provider_since
:annotation: :str | None
Indicates the provider version that started raising this deprecation warning