MCPcopy Create free account
hub / github.com/TAMustafa/Local_Chat_RAG / http_exception_handler

Function http_exception_handler

backend/app/error_handlers.py:9–13  ·  view source on GitHub ↗
(request: Request, exc: HTTPException)

Source from the content-addressed store, hash-verified

7# Centralized error handlers for FastAPI
8
9def http_exception_handler(request: Request, exc: HTTPException):
10 return JSONResponse(
11 status_code=exc.status_code,
12 content={"detail": exc.detail}
13 )
14
15def sqlalchemy_exception_handler(request: Request, exc: SQLAlchemyError):
16 logging.error(f"SQLAlchemy error: {exc}")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected