16 lines
346 B
Python
16 lines
346 B
Python
|
# exceptions.py
|
||
|
class AlbumException(Exception):
|
||
|
...
|
||
|
|
||
|
|
||
|
class AlbumNotFoundError(AlbumException):
|
||
|
def __init__(self):
|
||
|
self.status_code = 404
|
||
|
self.detail = "Album Not Found"
|
||
|
|
||
|
|
||
|
class AlbumAlreadyExistError(AlbumException):
|
||
|
def __init__(self):
|
||
|
self.status_code = 409
|
||
|
self.detail = "Album Already Exists"
|