voice-agent / src /app /core /errors.py
Sbboss's picture
Restore backend and Streamlit UI sources
699677f
raw
history blame contribute delete
513 Bytes
"""Typed application errors."""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any
@dataclass
class AppError(Exception):
"""Base application error with a code and message."""
code: str
message: str
details: dict[str, Any] | None = None
class ValidationError(AppError):
"""Raised when client input is invalid."""
class SpeechError(AppError):
"""Raised when STT/TTS fails."""
class LLMError(AppError):
"""Raised when LLM call fails."""