{"record":{"id":"13c1b49a067a5d40","repo":"langflow-ai/langflow","slug":"reload-in-progress","errorCode":"reload-in-progress","errorMessage":"reload-in-progress: ${inProgress.message}","messagePattern":"reload-in-progress: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":409,"severity":"error","filePath":"src/frontend/src/controllers/API/queries/extensions/use-reload-bundle.ts","lineNumber":71,"sourceCode":"    const url = `${getURL(\"EXTENSIONS\")}/${payload.extensionId}/bundles/${payload.bundleName}/reload`;\n    try {\n      const res = await api.post<ReloadBundleResponse>(url);\n      return res.data;\n    } catch (error: unknown) {\n      const detail = (error as { response?: { data?: { detail?: unknown } } })\n        ?.response?.data?.detail;\n      const status = (error as { response?: { status?: number } })?.response\n        ?.status;\n\n      // Surface 409 reload-in-progress with a stable, parseable shape so\n      // the caller can branch on the code without inspecting status codes.\n      if (\n        detail &&\n        typeof detail === \"object\" &&\n        (detail as ReloadInProgressDetail).code === \"reload-in-progress\"\n      ) {\n        const inProgress = detail as ReloadInProgressDetail;\n        throw new Error(`reload-in-progress: ${inProgress.message}`);\n      }\n\n      // 422 carries the full ReloadResult in detail.result so structural\n      // failures keep the same body shape as a 200 -- the caller's\n      // onSuccess handler renders the typed errors inline via the\n      // existing ok=false branch.\n      if (status === 422 && detail && typeof detail === \"object\") {\n        const result = (detail as { result?: ReloadBundleResponse }).result;\n        if (result && typeof result === \"object\") {\n          return result;\n        }\n      }\n\n      throw new Error(\n        extractApiErrorMessage(\n          error as Parameters<typeof extractApiErrorMessage>[0],\n          \"Failed to reload bundle\",\n        ),","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/controllers/API/queries/extensions/use-reload-bundle.ts#L53-L89","documentation":"404 from the PATCH settings endpoint: the Folder lookup with selectinload(Folder.flows) filtered on (id == project_id, user_id == current_user.id) returned nothing. As with the SSE route, ownership scoping makes 'not yours' identical to 'not found'.","triggerScenarios":"PATCH project MCP settings for a deleted project, a project id belonging to another user, or a stale id in the browser tab after the project was re-created.","commonSituations":"Two browser tabs / stale SPA state PATCHing a project that was deleted elsewhere; exporting a flow with project-scoped MCP settings and importing it into a different instance where the folder id does not exist.","solutions":["Reload the projects list in the UI and PATCH the current project id.","Verify ownership of the folder in the DB (select * from folder where id = ...).","Close stale tabs/clients after deleting or moving a project."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if str(project_id) not in {str(p.id) for p in await client.list_projects()}:\n    raise LookupError(\"project id is stale; reload the projects page before PATCHing\")","typeGuard":null,"tryCatchPattern":"try:\n    await client.patch(settings_url, json=payload)\nexcept httpx.HTTPStatusError as e:\n    if e.response.status_code == 404:\n        await reload_project_state()  # refresh ids, then re-apply the PATCH","preventionTips":["Close project settings tabs after deleting the project.","After import/export across instances, always open the project fresh before editing MCP settings."],"tags":["mcp","http-404","patch","ownership"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}