9 lines
278 B
Python
9 lines
278 B
Python
from fastapi import HTTPException, status
|
|
|
|
|
|
class BaseError(HTTPException):
|
|
status_code: int = status.HTTP_500_INTERNAL_SERVER_ERROR
|
|
|
|
def __init__(self, detail: str):
|
|
self.detail = detail
|
|
super().__init__(status_code=self.status_code, detail=self.detail) |