22 lines
683 B
Python
22 lines
683 B
Python
"""Shared domain errors used across API, service, and persistence layers."""
|
|
|
|
|
|
class StrategyNotFoundError(ValueError):
|
|
"""Raised when a referenced strategy ID does not exist."""
|
|
|
|
|
|
class StrategyInactiveError(ValueError):
|
|
"""Raised when a new portfolio selection targets an inactive strategy."""
|
|
|
|
|
|
class DaemonNotFoundError(ValueError):
|
|
"""Raised when a referenced daemon ID does not exist or is not owned by the portfolio owner."""
|
|
|
|
|
|
class DaemonInactiveError(ValueError):
|
|
"""Raised when a new portfolio assignment targets an inactive daemon."""
|
|
|
|
|
|
class DaemonInUseError(ValueError):
|
|
"""Raised when an owner transfer targets a daemon assigned to a portfolio."""
|