{"record":{"id":"0d68881fb51babe1","repo":"langflow-ai/langflow","slug":"an-error-occurred-while-uploading-the-file","errorCode":null,"errorMessage":"An error occurred while uploading the file","messagePattern":"An error occurred while uploading the file","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/frontend/src/hooks/files/use-upload-file.ts","lineNumber":113,"sourceCode":"            .split(\"/\")\n            .filter(Boolean)\n            .pop();\n          if (relativeParts.length > 0 && serverLeaf) {\n            relativeParts[relativeParts.length - 1] = serverLeaf;\n            setRelativePathForServerPath(res.path, relativeParts.join(\"/\"));\n          } else {\n            setRelativePathForServerPath(res.path, file.webkitRelativePath);\n          }\n        }\n        filesIds.push(res.path);\n      }\n      return filesIds;\n    } catch (e: any) {\n      const errorMessage =\n        e?.response?.data?.detail ||\n        e?.message ||\n        \"An error occurred while uploading the file\";\n      throw new Error(errorMessage);\n    }\n  };\n\n  return uploadFile;\n};\n\nexport default useUploadFile;\n","sourceCodeStart":95,"sourceCodeEnd":121,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/hooks/files/use-upload-file.ts#L95-L121","documentation":"404 from the is-installed check endpoint: the owner-scoped Folder lookup (id + user_id) found nothing before any config inspection happens. Identical semantics to the other project 404s — deleted, foreign, or mistyped project id.","triggerScenarios":"GET /api/v1/mcp/projects/{project_id}/install/check (status route) after the project was deleted, with a project id owned by another user, or with a stale id cached by the UI.","commonSituations":"UI page left open across a project deletion/recreation; account switch; copying project ids between instances.","solutions":["Refresh the project list and use the current project id.","Confirm the authenticated user owns the folder.","Re-open the project page so the SPA re-fetches ids."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"owned = {str(p.id) for p in await client.list_projects()}\nassert str(project_id) in owned, \"stale project id — refetch before install-check\"","typeGuard":null,"tryCatchPattern":"except httpx.HTTPStatusError as e:\n    if e.response.status_code == 404:\n        await refresh_project_ids()","preventionTips":["Refetch project ids after any delete/recreate of projects.","Don't cache project ids across user sessions."],"tags":["mcp","http-404","install","ownership"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}