Coverage for src/ecnl/domain/exceptions.py: 100%
3 statements
« prev ^ index » next coverage.py v7.14.2, created at 2026-06-28 08:19 +0000
« prev ^ index » next coverage.py v7.14.2, created at 2026-06-28 08:19 +0000
1"""Domain exceptions for the ECNL application.
3All exceptions raised by the application layer or adapters are rooted here.
4Callers can catch ECNLError to handle any domain-level failure, or catch
5subclasses for finer-grained handling.
6"""
9class ECNLError(Exception):
10 """Base class for all ECNL domain exceptions."""
13class ECNLNotFoundError(ECNLError):
14 """Raised when the requested resource does not exist (HTTP 404 or empty result)."""
17class UpstreamAPIError(ECNLError):
18 """Raised when the upstream AthleteOne API returns an unexpected error.
20 Covers non-2xx HTTP responses and ``{"result": "error"}`` envelopes returned
21 with a 200 status.
22 """