{"record":{"id":"d59e60df811f4d66","repo":"different-ai/openwork","slug":"the-install-link-response-was-incomplete-d59e60","errorCode":null,"errorMessage":"The install link response was incomplete.","messagePattern":"The install link response was incomplete\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ee/apps/den-web/app/(den)/_components/join-org-success.tsx","lineNumber":154,"sourceCode":"    const link = document.createElement(\"a\");\n    link.href = href;\n    link.rel = \"noopener noreferrer\";\n    link.target = \"_blank\";\n    link.setAttribute(\"data-testid\", \"join-org-download-link\");\n    document.body.append(link);\n    link.click();\n    link.remove();\n  }\n\n  async function handleGetApp() {\n    setInstallBusy(true);\n    setActionError(null);\n\n    try {\n      const installPageUrl = await createOrganizationInstallLink(organizationId, false);\n      const token = installTokenFromPageUrl(installPageUrl);\n      if (!token) {\n        throw new Error(\"The install link response was incomplete.\");\n      }\n\n      const { response, payload } = await requestJson(\n        `/v1/install-config?token=${encodeURIComponent(token)}`,\n        { method: \"GET\" },\n        12000,\n      );\n      if (!response.ok) {\n        throw new Error(getInstallConfigErrorMessage(payload, response.status));\n      }\n\n      const apiUrl = installerApiUrlFromConfig(payload);\n      if (!apiUrl) {\n        throw new Error(\"This install link returned incomplete setup details.\");\n      }\n\n      const platform = detectedInstallPlatform(detected) ?? \"mac-arm64\";\n      const href = buildInstallDownloadHref(apiUrl, platform, token);","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/different-ai/openwork/blob/2b7df46e8ae1517d64c896c7793d2d52ec845669/ee/apps/den-web/app/(den)/_components/join-org-success.tsx#L136-L172","documentation":"In JoinOrgSuccess's handleGetApp, after createOrganizationInstallLink returns an install page URL, the code extracts the install token with installTokenFromPageUrl. If the URL does not contain a recognizable token, it throws \"The install link response was incomplete.\" — the server returned a link but it lacks the token the install-config endpoint needs.","triggerScenarios":"createOrganizationInstallLink(organizationId, false) resolves to a URL from which installTokenFromPageUrl cannot parse a token (missing/empty token query param, unexpected URL shape).","commonSituations":"Den API returning a changed/legacy install page URL format; empty response on server error paths still shaped as a URL string; org in a state that cannot mint install links (e.g. billing/seats).","solutions":["Log the returned installPageUrl and check whether it carries the expected token query parameter.","Retry createOrganizationInstallLink; if the URL is persistently tokenless, verify the org allows install links (seats/billing) and the Den API version matches the web client.","Fall back to the admin Members page to generate a working install link manually."],"exampleFix":"// before\nconst url = await createOrganizationInstallLink(orgId, false); // \"/install\" (no token)\n// after: server includes token\nconst url = await createOrganizationInstallLink(orgId, false); // \"/install?token=...\"","handlingStrategy":"type-guard","validationCode":"const installPageUrl = await createOrganizationInstallLink(orgId, false);\ntry { new URL(installPageUrl); } catch { throw new Error(\"Install link is not a valid URL\"); }\nconst token = installTokenFromPageUrl(installPageUrl);\nif (!token) throw new Error(\"Install link has no token\");","typeGuard":"function hasInstallToken(t) {\n  return typeof t === \"string\" && t.trim().length > 0;\n}","tryCatchPattern":"try {\n  await handleGetApp(orgId);\n} catch (err) {\n  if (err.message === \"The install link response was incomplete.\") {\n    // retry link creation once, then surface an admin-contact state\n  } else throw err;\n}","preventionTips":["Verify install-page URL format contract between Den API and web client in tests.","Retry link creation once before surfacing the error (transient server states).","Confirm org eligibility (seats/billing) before calling createOrganizationInstallLink."],"tags":["install","den","token","parsing"],"backgroundTag":"malformed-response","analyzedSha":"2b7df46e8ae1517d64c896c7793d2d52ec845669","analyzedAt":"2026-09-01T07:59:23.713Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}