(request: Request, exc: SQLAlchemyError)
| 13 | ) |
| 14 | |
| 15 | def 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 | |
| 22 | def generic_exception_handler(request: Request, exc: Exception): |
| 23 | logging.error(f"Unhandled error: {exc}") |
nothing calls this directly
no outgoing calls
no test coverage detected