[feat] add basic domain
This commit is contained in:
parent
a5577c1501
commit
39f28d8f30
5 changed files with 155 additions and 0 deletions
18
domain/error.py
Normal file
18
domain/error.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue