This commit is contained in:
Андрей Сумин
2025-02-28 21:52:48 +03:00
commit 70325c3c0d
63 changed files with 3690 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
from http import HTTPStatus as status
from django.core.exceptions import ValidationError
class ConflictError(Exception):
def __init__(self, validation_error: ValidationError) -> None:
self.validation_error = validation_error
class ForbiddenError(Exception):
def __init__(self, message: str = status.FORBIDDEN.phrase) -> None:
self.message = message