34 lines
779 B
Python
34 lines
779 B
Python
class DomainError(Exception):
|
|
pass
|
|
|
|
|
|
class UserError(DomainError):
|
|
pass
|
|
|
|
|
|
class UserNotFoundError(UserError):
|
|
def __init__(self, user_id: str) -> None:
|
|
super().__init__('user_not_found')
|
|
self.user_id = user_id
|
|
|
|
|
|
class UserConflictError(UserError):
|
|
def __init__(self, email: str) -> None:
|
|
super().__init__('user_conflict')
|
|
self.email = email
|
|
|
|
|
|
class SandboxError(DomainError):
|
|
pass
|
|
|
|
|
|
class SandboxStartError(SandboxError):
|
|
def __init__(self, chat_id: str) -> None:
|
|
super().__init__('sandbox_start_failed')
|
|
self.chat_id = chat_id
|
|
|
|
|
|
class SandboxAlreadyRunningError(SandboxError):
|
|
def __init__(self, chat_id: str) -> None:
|
|
super().__init__('sandbox_already_running')
|
|
self.chat_id = chat_id
|