Programmatically author, schedule and monitor data pipelines
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Comprehensive exception hierarchy for error handling, timeout management, and workflow recovery. Airflow provides structured exceptions for different failure scenarios.
Base exception classes for Airflow errors.
class AirflowException(Exception):
"""Base exception for all Airflow errors."""
class AirflowBadRequest(AirflowException):
"""Exception for bad request errors."""
class AirflowNotFoundException(AirflowException):
"""Exception when requested resource is not found."""
class AirflowConfigException(AirflowException):
"""Exception for configuration errors."""Exceptions related to task execution and lifecycle.
class AirflowTaskTimeout(AirflowException):
"""Exception when task exceeds execution timeout."""
class AirflowSensorTimeout(AirflowException):
"""Exception when sensor times out waiting for condition."""
class AirflowRescheduleException(AirflowException):
"""Exception to reschedule task for later execution."""
def __init__(self, reschedule_date: datetime):
"""
Create reschedule exception.
Args:
reschedule_date: When to reschedule the task
"""
class AirflowSkipException(AirflowException):
"""Exception to skip task execution."""
class AirflowFailException(AirflowException):
"""Exception to mark task as failed."""Handle callback failures and retry logic.
class AirflowRetryException(AirflowException):
"""Exception to trigger task retry."""
class AirflowCallbackException(AirflowException):
"""Exception in callback execution."""Exceptions for metrics and statistics collection.
class InvalidStatsNameException(AirflowException):
"""Exception for invalid statistics names."""from datetime import datetime
from typing import Optional
ExceptionType = type[Exception]Install with Tessl CLI
npx tessl i tessl/pypi-apache-airflow