{"record":{"id":"5fea33a4802bf68a","repo":"langflow-ai/langflow","slug":"error-processing-build-events","errorCode":null,"errorMessage":"Error processing build events","messagePattern":"Error processing build events","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/frontend/src/utils/buildUtils.ts","lineNumber":315,"sourceCode":"        onValidateNodes,\n      };\n\n      return performStreamingRequest({\n        method: \"POST\",\n        url: buildUrl,\n        body: postData,\n        onData: async (event) => {\n          const type = event[\"event\"];\n          const data = event[\"data\"];\n          return onEvent(type, data, buildResults, eventCallbacks);\n        },\n        onDataBatch: (events) =>\n          processBatchedEvents(events, buildResults, eventCallbacks, onEvent),\n        onError: (statusCode) => {\n          if (statusCode === 404) {\n            throw new Error(\"Flow not found\");\n          }\n          throw new Error(\"Error processing build events\");\n        },\n        onNetworkError: (error: Error) => {\n          if (error.name === \"AbortError\") {\n            onBuildStopped && onBuildStopped();\n            return;\n          }\n          onBuildError!(\"Error Building Component\", [\n            \"Network error. Please check the connection to the server.\",\n          ]);\n        },\n        buildController,\n      });\n    }\n  } catch (e) {\n    console.error(e);\n  }\n\n  try {","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/utils/buildUtils.ts#L297-L333","documentation":"Generic failure thrown by buildUtils when the streaming build-events connection returns any non-OK status other than 404 during an active build stream. It means the backend accepted the build start but the events stream itself failed (server error, auth expiry, proxy timeout), and no more specific message is available client-side.","triggerScenarios":"performStreamingRequest's fetch for build events returns 401/403/500/502 etc. mid-build — e.g. the auth token expired between build start and stream open, or a reverse proxy cut the SSE connection.","commonSituations":"Session cookie/JWT expiring during long builds, gateway timeouts on slow flows, backend exceptions while validating a component, or backend restart while a build stream is open.","solutions":["Check the backend logs for the matching request — the status code reaching the client (not the message) is the real clue","If auth-related (401/403), log in again / refresh the token and retry the build","If proxy timeouts (502/504), increase proxy read timeout for streaming endpoints (SSE) in nginx/traefik","Retry the build once after a page refresh; if reproducible, isolate the component triggering the backend error"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await streamBuild(...);\n} catch (e) {\n  if (e instanceof Error && e.message === \"Error processing build events\") {\n    if (++attempt <= 2) await streamBuild(...); else surfaceError();\n  } else throw e;\n}","preventionTips":["Pass an onError handler to performStreamingRequest so real status codes are logged instead of the generic message","Keep auth tokens refreshed before long build sessions","Configure proxy read timeouts for SSE endpoints"],"tags":["frontend","build","streaming","http-error","proxy"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}