{"record":{"id":"5aa645de2e68029c","repo":"langflow-ai/langflow","slug":"unsupported-event-delivery-event-delivery-r-use","errorCode":null,"errorMessage":"Unsupported event_delivery {event_delivery!r}. Use one of: {supported}. For multi-worker Redis deployments, all three values are supported; set LANGFLOW_EVENT_DELIVERY to override the default.","messagePattern":"Unsupported event_delivery (.+?)\\. Use one of: (.+?)\\. For multi-worker Redis deployments, all three values are supported; set LANGFLOW_EVENT_DELIVERY to override the default\\.","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"warning","filePath":"src/backend/base/langflow/api/build.py","lineNumber":273,"sourceCode":"            await touch(job_id)\n        if event_delivery in (EventDeliveryType.STREAMING, EventDeliveryType.DIRECT):\n            return await create_flow_response(\n                queue=main_queue,\n                event_manager=event_manager,\n                event_task=event_task,\n                queue_service=queue_service,\n                job_id=job_id,\n            )\n\n        if event_delivery != EventDeliveryType.POLLING:\n            # Defensive exhaustiveness check: if a new EventDeliveryType is added\n            # without wiring it up here, surface a clear error instead of silently\n            # treating it as polling. Each delivery mode has different cross-worker\n            # guarantees (DIRECT/STREAMING use signal_cancel + heartbeat; POLLING\n            # uses the watchdog), so silent fallthrough hides real configuration\n            # bugs in multi-worker Redis setups.\n            supported = \", \".join(sorted(t.value for t in EventDeliveryType))\n            raise HTTPException(\n                status_code=400,\n                detail=(\n                    f\"Unsupported event_delivery {event_delivery!r}. \"\n                    f\"Use one of: {supported}. \"\n                    \"For multi-worker Redis deployments, all three values are supported; \"\n                    \"set LANGFLOW_EVENT_DELIVERY to override the default.\"\n                ),\n            )\n\n        # Polling mode - get all available events\n        try:\n            events: list = []\n            # Get all available events from the queue without blocking\n            while not main_queue.empty():\n                _, value, _ = await main_queue.get()\n                if value is None:\n                    # End of stream, trigger end event\n                    if event_task is not None:","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/build.py#L255-L291","documentation":"A defensive exhaustiveness check in the flow-events endpoint: event_delivery parsed to a value that is neither STREAMING, DIRECT, nor POLLING. Because the parameter is typed as the EventDeliveryType enum this normally cannot happen from valid input — it fires when a new enum member is added without wiring it into get_flow_events_response, or when a raw string bypasses FastAPI validation. 400 with the supported list in the message.","triggerScenarios":"Sending event_delivery=<unrecognized value> to the events endpoint via a client that skips enum validation, or running a patched/forked backend that added an EventDeliveryType member without handling it here.","commonSituations":"Version skew between a custom frontend/SDK and the backend after a new delivery mode was partially introduced; direct HTTP calls with hand-written query strings.","solutions":["Use one of the supported values from the message: the sorted EventDeliveryType values (direct, polling, streaming).","Set LANGFLOW_EVENT_DELIVERY to override the default instead of probing undocumented values.","If you forked Langflow and added an enum member, wire its handling into get_flow_events_response."],"exampleFix":"# before\nGET /api/v1/build/{job_id}/events?event_delivery=websocket\n\n# after\nGET /api/v1/build/{job_id}/events?event_delivery=streaming","handlingStrategy":"validation","validationCode":"SUPPORTED = {t.value for t in EventDeliveryType}  # {'direct','polling','streaming'}\n\ndef valid_delivery(value: str) -> str | None:\n    return value if value in SUPPORTED else None","typeGuard":"def is_supported_delivery(v: str) -> TypeGuard[str]:\n    return v in {t.value for t in EventDeliveryType}","tryCatchPattern":null,"preventionTips":["Send only enum member values (direct/polling/streaming) for event_delivery.","Prefer setting LANGFLOW_EVENT_DELIVERY over passing per-request values.","After upgrading, re-read the accepted values from the error message itself."],"tags":["event-delivery","http-400","defensive-check","build"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}