Coverage for src/mls/domain/exceptions.py: 100%
3 statements
« prev ^ index » next coverage.py v7.15.3, created at 2026-08-05 10:11 +0000
« prev ^ index » next coverage.py v7.15.3, created at 2026-08-05 10:11 +0000
1"""Domain exceptions for the MLS application.
3All exceptions raised by the application layer or adapters are rooted here.
4Callers can catch MLSError to handle any domain-level failure, or catch
5subclasses for finer-grained handling.
6"""
9class MLSError(Exception):
10 """Base class for all MLS domain exceptions."""
13class MLSNotFoundError(MLSError):
14 """Raised when the requested resource does not exist (HTTP 404)."""
17class UpstreamAPIError(MLSError):
18 """Raised when the upstream ESPN API returns an unexpected error (non-2xx HTTP response)."""