| 24 | |
| 25 | |
| 26 | class CustomHttpException(HTTPException): |
| 27 | def __init__(self, code: str, detail: str, status_code: int = status.HTTP_400_BAD_REQUEST): |
| 28 | self.code = code |
| 29 | super().__init__(status_code, detail) |
| 30 | |
| 31 | @property |
| 32 | def as_dict(self) -> dict: |
| 33 | return {"code": self.code, "detail": self.detail} |
| 34 | |
| 35 | |
| 36 | class AuthenticationFailed(CustomHttpException): |
nothing calls this directly
no outgoing calls
no test coverage detected