INNER CODE UNIT · Python

exception_handler

vsdudakov/fastadmin · fastadmin/api/frameworks/fastapi/app.py:27

async def exception_handler(_: Request, exc: Exception):
    # Log the real error server-side but never leak internals to the client.
    logger.error("Unhandled admin error: %s", exc)
    return JSONResponse(
        status_code=500,
        content={"exception": "Internal server error."},
    )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…