23 lines
794 B
Python
23 lines
794 B
Python
|
|
"""
|
||
|
|
Subscription-related exceptions
|
||
|
|
"""
|
||
|
|
|
||
|
|
class SubscriptionException(Exception):
|
||
|
|
"""Base class for subscription-related exceptions"""
|
||
|
|
pass
|
||
|
|
|
||
|
|
class SubscriptionNotFound(SubscriptionException):
|
||
|
|
"""Exception raised when subscription is not found"""
|
||
|
|
def __init__(self, message: str = "Subscription not found"):
|
||
|
|
super().__init__(message)
|
||
|
|
|
||
|
|
class SubscriptionAlreadyExists(SubscriptionException):
|
||
|
|
"""Exception raised when subscription already exists"""
|
||
|
|
def __init__(self, message: str = "Subscription already exists"):
|
||
|
|
super().__init__(message)
|
||
|
|
|
||
|
|
class SubscriptionUpdateFailed(SubscriptionException):
|
||
|
|
"""Exception raised when subscription update fails"""
|
||
|
|
def __init__(self, message: str = "Subscription update failed"):
|
||
|
|
super().__init__(message)
|