Skip to content
Snippets Groups Projects
Commit e76d632b authored by Tim Repke's avatar Tim Repke
Browse files

improve errors and fix import loop

parent f8102abb
No related branches found
No related tags found
1 merge request!41Master
...@@ -8,9 +8,9 @@ from fastapi.middleware.trustedhost import TrustedHostMiddleware ...@@ -8,9 +8,9 @@ from fastapi.middleware.trustedhost import TrustedHostMiddleware
from .util.middlewares import TimingMiddleware, ErrorHandlingMiddleware from .util.middlewares import TimingMiddleware, ErrorHandlingMiddleware
from .util.config import settings from .util.config import settings
from .data import db_engine
from .util.logging import get_logger from .util.logging import get_logger
from .api import router as api_router from .api import router as api_router
from .data import db_engine
mimetypes.init() mimetypes.init()
......
from fastapi import status as http_status from fastapi import status as http_status
class UserPermissionError(Exception):
status = http_status.HTTP_403_FORBIDDEN
class DataNotFoundWarning(Warning): class DataNotFoundWarning(Warning):
status = http_status.HTTP_204_NO_CONTENT status = http_status.HTTP_204_NO_CONTENT
class NoDataForKeyError(Exception): class NoDataForKeyError(Exception):
pass status = http_status.HTTP_410_GONE
class ItemNotFoundError(Exception): class ItemNotFoundError(Exception):
pass status = http_status.HTTP_404_NOT_FOUND
class ProjectNotFoundError(Exception): class ProjectNotFoundError(Exception):
status = 400 status = http_status.HTTP_400_BAD_REQUEST
class UserNotFoundError(Exception): class UserNotFoundError(Exception):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment