INNER CODE UNIT · Python

global_exception_handler

LeDat98/NexusRAG · backend/app/main.py:114

async def global_exception_handler(request: Request, exc: Exception):
    logger.error(f"Unhandled exception: {exc}", exc_info=True)
    return JSONResponse(status_code=500, content={"detail": "Internal server error"})


@app.get("/health")
async def health():
    return {"status": "healthy"}


@app.get("/ready")
async def ready():
    return {"status": "ready"}


# API routes
from app.api.router import api_router  # noqa: E402

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…