mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-02 01:22:07 -04:00
6a2a39f892
src/exceptions.py was a byte-for-byte duplicate of the canonical core/exceptions.py. Replace its class bodies with a re-export shim (mirroring the core/constants.py -> src/constants.py pattern) so the exception classes are defined in exactly one place. Also fix the stale "# src/exceptions.py" header comment in core/exceptions.py. No behavior change: both import paths resolve to the same class objects (verified by identity), so `except SessionNotFoundError` works regardless of which module it was imported from. Ran py_compile and pytest tests/test_app.py (12 passed). Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
747 B
Python
23 lines
747 B
Python
# src/exceptions.py
|
|
"""Backward-compatible shim — the single source of truth is core/exceptions.py.
|
|
|
|
Historically this module was a byte-for-byte duplicate of core/exceptions.py,
|
|
which is the canonical definition (imported by app.py, core/__init__.py, and
|
|
routes/chat_routes.py). To kill the drift, this now simply re-exports the
|
|
exception classes from core.exceptions so there is exactly one place that
|
|
defines them. Existing `from src.exceptions import ...` callers keep working.
|
|
"""
|
|
from core.exceptions import ( # noqa: F401
|
|
SessionNotFoundError,
|
|
InvalidFileUploadError,
|
|
LLMServiceError,
|
|
WebSearchError,
|
|
)
|
|
|
|
__all__ = [
|
|
"SessionNotFoundError",
|
|
"InvalidFileUploadError",
|
|
"LLMServiceError",
|
|
"WebSearchError",
|
|
]
|