class WorkflowError(Exception):
    """Base class for workflow errors."""


class WorkflowDefinitionError(WorkflowError):
    """Raised when a workflow definition is invalid."""


class WorkflowExecutionError(WorkflowError):
    """Raised for runtime workflow execution failures."""


class WorkflowLimitExceededError(WorkflowExecutionError):
    """Raised when a workflow exceeds one of its configured limits."""


class WorkflowTimeoutError(WorkflowExecutionError):
    """Raised when a workflow run exceeds its configured timeout."""


class TaskTimeoutError(WorkflowExecutionError):
    """Raised when a single task attempt exceeds its configured timeout."""


class StateValidationError(WorkflowExecutionError):
    """Raised when workflow state is invalid."""


class PayloadValidationError(WorkflowExecutionError):
    """Raised when a task payload does not match the configured input type."""
