lint and format

This commit is contained in:
grillazz
2025-08-24 15:40:06 +02:00
parent 9c7db17da8
commit 978041c6ee
7 changed files with 37 additions and 106 deletions

View File

@@ -1,11 +1,16 @@
from fastapi import FastAPI
from sqlalchemy.exc import SQLAlchemyError
from fastapi.exceptions import ResponseValidationError
from sqlalchemy.exc import SQLAlchemyError
from app.exception_handlers.database import SQLAlchemyExceptionHandler
from app.exception_handlers.validation import ResponseValidationExceptionHandler
def register_exception_handlers(app: FastAPI) -> None:
"""Register all exception handlers with the FastAPI app."""
app.add_exception_handler(SQLAlchemyError, SQLAlchemyExceptionHandler.handle_exception)
app.add_exception_handler(ResponseValidationError, ResponseValidationExceptionHandler.handle_exception)
app.add_exception_handler(
SQLAlchemyError, SQLAlchemyExceptionHandler.handle_exception
)
app.add_exception_handler(
ResponseValidationError, ResponseValidationExceptionHandler.handle_exception
)