Coverage for src/usls/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 USL Super League application.
3All exceptions raised by the application layer or adapters are rooted here.
4Callers can catch USLSError to handle any domain-level failure, or catch
5subclasses for finer-grained handling.
6"""
9class USLSError(Exception):
10 """Base class for all USL Super League domain exceptions."""
13class USLSNotFoundError(USLSError):
14 """Raised when the requested resource does not exist (HTTP 404)."""
17class UpstreamAPIError(USLSError):
18 """Raised when the upstream ESPN API returns an unexpected error (non-2xx HTTP response)."""