"""Stable, non-sensitive processing orchestration errors."""

from __future__ import annotations


class ProcessingError(RuntimeError):
    def __init__(self, code: str, safe_message: str, *, retryable: bool = False) -> None:
        super().__init__(safe_message)
        self.code = code
        self.safe_message = safe_message
        self.retryable = retryable


class ProcessingTransportError(RuntimeError):
    """Normalized remote transport failure; raw response bodies are never retained."""

    def __init__(
        self,
        code: str,
        *,
        retryable: bool,
        active_run_conflict: bool = False,
    ) -> None:
        super().__init__(code)
        self.code = code
        self.retryable = retryable
        self.active_run_conflict = active_run_conflict
