mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2026-03-25 06:26:31 +01:00
feat: add RandomService, seed diagnostics endpoint, and random mode docs
This commit is contained in:
parent
7e5a29dd74
commit
c4eb3bcd5a
10 changed files with 697 additions and 4 deletions
|
|
@ -1420,4 +1420,16 @@ class FeatureDisabledError(DeckBuilderError):
|
|||
|
||||
def __init__(self, feature: str, details: dict | None = None):
|
||||
message = f"Feature '{feature}' is currently disabled"
|
||||
super().__init__(message, code="FEATURE_DISABLED", details=details or {"feature": feature})
|
||||
super().__init__(message, code="FEATURE_DISABLED", details=details or {"feature": feature})
|
||||
|
||||
|
||||
# Random Mode Exceptions
|
||||
class InvalidSeedError(DeckBuilderError):
|
||||
"""Raised when a seed value fails validation.
|
||||
|
||||
Used by RandomService when the provided seed is the wrong type,
|
||||
out of range, or otherwise cannot be processed.
|
||||
"""
|
||||
|
||||
def __init__(self, message: str, details: dict | None = None):
|
||||
super().__init__(message, code="INVALID_SEED", details=details)
|
||||
Loading…
Add table
Add a link
Reference in a new issue