langflow-ai/langflow · error · Error

Error starting build process

Error message

Error starting build process

What it means

Default message thrown by buildUtils when the initial build POST fails with a non-404 status and the response body is either not JSON or has no `detail` field. When the backend does send a detail, that replaces this message — so seeing the literal text means the error body was empty/unparseable (e.g. an HTML error page from a proxy).

Source

Thrown at src/frontend/src/utils/buildUtils.ts:358

      },
      body: JSON.stringify(postData),
      credentials: getFetchCredentials(),
    });

    if (!buildResponse.ok) {
      if (buildResponse.status === 404) {
        throw new Error("Flow not found");
      }
      let errorDetail = "Error starting build process";
      try {
        const errorData = await buildResponse.json();
        if (errorData.detail) {
          errorDetail = errorData.detail;
        }
      } catch (parseError) {
        console.debug("Could not parse error response body:", parseError);
      }
      throw new Error(errorDetail);
    }

    const { job_id } = await buildResponse.json();

    const cancelBuildUrl = customCancelBuildUrl(job_id, playgroundPage);

    // Get the buildController from flowStore
    const buildController = new AbortController();
    buildController.signal.addEventListener("abort", () => {
      try {
        fetch(cancelBuildUrl, {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
          },
          credentials: getFetchCredentials(),
        });
      } catch (error) {

View on GitHub (pinned to 976ec789d2)

Solutions

  1. Reproduce with browser devtools open and inspect the raw response body/status of the failing POST — the default message hides it
  2. Check backend logs for the stack trace matching the request timestamp
  3. If the body is an HTML proxy error, fix the proxy (upstream timeout, body size) rather than the app
  4. If 401/403 with a non-FastAPI body, fix the auth layer or re-login
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const { job_id } = await startBuildJob(postData);
} catch (e) {
  // errorDetail may be the default text when the body wasn't FastAPI JSON
  logToDiagnostics({ url: buildUrl, status: lastStatus, bodySnippet: await raw.text?.() });
  if (/proxy|gateway|50[234]/.test(e.message)) inspectProxyConfig();
  else throw e;
}

Prevention

When it happens

Trigger: Build POST returns 500 with an empty body, a 502/503 HTML page from a reverse proxy, or a 401 from an auth layer that does not use FastAPI's {detail} shape; the try/catch around response.json() then falls through to the default message.

Common situations: Backend crashed mid-request (connection reset yields non-JSON), proxy misconfiguration returning HTML error pages, auth middleware rejecting with a custom body, backend/frontend version mismatch after partial upgrade.

Related errors


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/1d226cd9d2bf29f6. Report an issue: GitHub.