langflow-ai/langflow · error · HTTPException
str(exc)
Error message
str(exc)
What it means
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.
Source
Thrown at src/backend/base/langflow/api/build.py:576
# We need to get the id of each vertex
# and return the same structure but only with the ids
components_count = len(graph.vertices)
vertices_to_run = list(graph.vertices_to_run.union(get_top_level_vertices(graph, graph.vertices_to_run)))
await chat_service.set_cache(flow_id_str, graph)
await log_telemetry(start_time, components_count, run_id=build_run_id, success=True)
except Exception as exc:
await log_telemetry(
start_time,
components_count,
run_id=build_run_id,
success=False,
error_message=str(exc),
)
if isinstance(exc, LocalFileAccessError) or "stream or streaming set to True" in str(exc):
raise HTTPException(status_code=400, detail=str(exc)) from exc
await logger.aexception("Error checking build status: " + str(exc))
raise HTTPException(status_code=500, detail=str(exc)) from exc
return first_layer, vertices_to_run, graph
async def log_telemetry(
start_time: float,
components_count: int,
*,
run_id: str | None = None,
success: bool,
error_message: str | None = None,
):
background_tasks.add_task(
telemetry_service.log_package_playground,
PlaygroundPayload(
playground_seconds=int(time.perf_counter() - start_time),
playground_component_count=components_count,
playground_success=success,View on GitHub (pinned to 976ec789d2)
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
Example fix
// before: LLM node with streaming field left false but connected to a stream-only output
// after: set input_value 'stream or streaming set to True' per the 400 guidance, or fix the node raising the 500
// and inspect server log traceback:
await logger.aexception("Error checking build status: " + str(exc)) Defensive patterns
Strategy: try-catch
Try / catch
try { const res = await buildFlow(flowId) } catch (e) { console.error(e.response?.data?.detail); // contains root cause text
if (e.response?.status === 400) fixLocalFileOrStreaming(e); else inspectServerLogs(); } Prevention
- 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
When it happens
Trigger: 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').
Common situations: Custom component raising at build, invalid node connections, missing environment variables, incompatible component versions after upgrade.
Related errors
- str(e)
- Unexpected error: {exc!s}
- parse_exception(exc)
- HTTP error! status: ${response.status}
- Failed to load models. Please check your provider credential
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/d52411c5793245e7.
Report an issue: GitHub.