async def METHOD_NAME(request: fastapi.Request, exc: Exception):
    # pylint: disable=unused-argument
    """
    A custom exception handler is required, otherwise no CORS headers are included
    in the case of exceptions.
    https://github.com/encode/starlette/issues/1175
    """
    cors_middleware = cors.CORSMiddleware(
        app=app,
        allow_origins=["*"],
        allow_credentials=True,
        allow_methods=["POST", "GET", "OPTIONS", "DELETE", "PUT", "PATCH"],
        allow_headers=["*"],
    )
    response = responses.JSONResponse(
        status_code=500, content={"body": "Internal Server Error"}
    )
    response.headers.update(cors_middleware.simple_headers)
    return response