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

Function sqlalchemy_exception_handler

backend/app/error_handlers.py:15–20  ·  view source on GitHub ↗
(request: Request, exc: SQLAlchemyError)

Source from the content-addressed store, hash-verified

13 )
14
15def sqlalchemy_exception_handler(request: Request, exc: SQLAlchemyError):
16 logging.error(f"SQLAlchemy error: {exc}")
17 return JSONResponse(
18 status_code=HTTP_500_INTERNAL_SERVER_ERROR,
19 content={"detail": "A database error occurred."}
20 )
21
22def generic_exception_handler(request: Request, exc: Exception):
23 logging.error(f"Unhandled error: {exc}")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected