async def METHOD_NAME(
    self, client_without_exceptions, session, flow_run_id, task_run_id, log_data
):
    with mock.patch("prefect.server.models.logs.create_logs") as mock_create_logs:
        def raise_error(*args, **kwargs):
            raise FlushError
        mock_create_logs.side_effect = raise_error
        response = await client_without_exceptions.post(
            CREATE_LOGS_URL, json=log_data
        )
        assert response.status_code == 500