{"record":{"id":"d52411c5793245e7","repo":"langflow-ai/langflow","slug":"str-exc-d52411","errorCode":null,"errorMessage":"str(exc)","messagePattern":"str\\(exc\\)","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"error","filePath":"src/backend/base/langflow/api/build.py","lineNumber":576,"sourceCode":"            # We need to get the id of each vertex\n            # and return the same structure but only with the ids\n            components_count = len(graph.vertices)\n            vertices_to_run = list(graph.vertices_to_run.union(get_top_level_vertices(graph, graph.vertices_to_run)))\n\n            await chat_service.set_cache(flow_id_str, graph)\n            await log_telemetry(start_time, components_count, run_id=build_run_id, success=True)\n\n        except Exception as exc:\n            await log_telemetry(\n                start_time,\n                components_count,\n                run_id=build_run_id,\n                success=False,\n                error_message=str(exc),\n            )\n\n            if isinstance(exc, LocalFileAccessError) or \"stream or streaming set to True\" in str(exc):\n                raise HTTPException(status_code=400, detail=str(exc)) from exc\n            await logger.aexception(\"Error checking build status: \" + str(exc))\n            raise HTTPException(status_code=500, detail=str(exc)) from exc\n        return first_layer, vertices_to_run, graph\n\n    async def log_telemetry(\n        start_time: float,\n        components_count: int,\n        *,\n        run_id: str | None = None,\n        success: bool,\n        error_message: str | None = None,\n    ):\n        background_tasks.add_task(\n            telemetry_service.log_package_playground,\n            PlaygroundPayload(\n                playground_seconds=int(time.perf_counter() - start_time),\n                playground_component_count=components_count,\n                playground_success=success,","sourceCodeStart":558,"sourceCodeEnd":594,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/backend/base/langflow/api/build.py#L558-L594","documentation":"This is the generic str(exc) detail on an HTTP 500 raised by the build-status exception handler in build.py. Any unexpected exception while checking/building the flow (that is not a LocalFileAccessError or a streaming misconfiguration) is re-raised as 500 with the raw exception message, after telemetry logging.","triggerScenarios":"Any unhandled exception during flow build/status check: broken component code, invalid graph payload, missing API keys surfacing at build time, serialization errors in vertex data — anything not matching the two special-cased conditions (LocalFileAccessError, 'stream or streaming set to True').","commonSituations":"Custom component raising at build, invalid node connections, missing environment variables, incompatible component versions after upgrade.","solutions":["Read the full str(exc) message — it usually contains the underlying component/stack error","Check server logs: the handler calls logger.aexception('Error checking build status: ...') with the traceback","Reproduce with the component standalone (LFX_DEV=1 backend + single component) to isolate the failing node","If the message mentions streaming, set the chat/Streaming field to True or use the proper streaming input on Chat components"],"exampleFix":"// before: LLM node with streaming field left false but connected to a stream-only output\n// after: set input_value 'stream or streaming set to True' per the 400 guidance, or fix the node raising the 500\n// and inspect server log traceback:\nawait logger.aexception(\"Error checking build status: \" + str(exc))","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const res = await buildFlow(flowId) } catch (e) { console.error(e.response?.data?.detail); // contains root cause text\n  if (e.response?.status === 400) fixLocalFileOrStreaming(e); else inspectServerLogs(); }","preventionTips":["Wrap every programmatic build call and surface detail to logs","Validate flow payloads (nodes exist, connections reference real handles) before building","Run LFX_DEV=1 backend when iterating on components to catch build errors early"],"tags":["build","http-500","generic-handler","graph-execution"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}