feat: implement error handling middleware with request ID tracking for improved error responses

This commit is contained in:
Abhimanyu Saharan
2026-02-07 03:14:30 +05:30
parent a4442eb9d5
commit 19323e25de
5 changed files with 278 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ from app.api.metrics import router as metrics_router
from app.api.tasks import router as tasks_router
from app.api.users import router as users_router
from app.core.config import settings
from app.core.error_handling import install_error_handling
from app.core.logging import configure_logging
from app.db.session import init_db
@@ -45,6 +46,8 @@ if origins:
allow_headers=["*"],
)
install_error_handling(app)
@app.get("/health")
def health() -> dict[str, bool]: