diff --git a/src/exceptions.py b/src/exceptions.py index 8b3629c..5a6ed3a 100644 --- a/src/exceptions.py +++ b/src/exceptions.py @@ -27,3 +27,12 @@ class ConflictException(HTTPException): status_code=status.HTTP_409_CONFLICT, detail=detail, ) + + +class ForbiddenException(HTTPException): + def __init__(self, message: Optional[str] = None) -> None: + detail = "Forbidden" if not message else message + super().__init__( + status_code=status.HTTP_403_FORBIDDEN, + detail=detail, + )