{"record":{"id":"c8d681de345fbe30","repo":"diegosouzapw/OmniRoute","slug":"volcano-kind-plan-discovery-requires-accountid","errorCode":null,"errorMessage":"Volcano ${kind} plan discovery requires AccountId, but none found in console cookie — re-bind the plan","messagePattern":"Volcano (.+?) plan discovery requires AccountId, but none found in console cookie — re-bind the plan","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/providers/volcenginePlanModelDiscovery.ts","lineNumber":369,"sourceCode":"): Promise<SyncedAvailableModelInput[]> {\n  if (!cookieHeader || !csrfToken) {\n    throw new Error(\"Volcano console cookie or csrfToken is missing — re-bind the plan\");\n  }\n\n  // Validate the subscription/credentials are still live.\n  const detected = await detectPlan(kind, cookieHeader, csrfToken);\n  if (!detected.available) {\n    throw new Error(\n      `Volcano ${kind} plan unavailable${detected.error ? `: ${detected.error}` : \"\"} — re-bind the plan`\n    );\n  }\n\n  const cfg = PLAN_DISCOVERY_CONFIG[kind];\n  const payload: JsonRecord = { ...cfg.payload };\n  if (cfg.requiresAccountId) {\n    const accountId = extractAccountId(cookieHeader);\n    if (accountId === null) {\n      throw new Error(\n        `Volcano ${kind} plan discovery requires AccountId, but none found in console cookie — re-bind the plan`\n      );\n    }\n    payload.AccountId = accountId;\n  }\n  const result = await callConsoleApiDirect(\n    cfg.action,\n    payload,\n    cookieHeader,\n    csrfToken,\n    cfg.referer\n  );\n  if (!result.ok) {\n    throw new Error(\n      `Volcano ${kind} plan model discovery (${cfg.action}) failed${result.error ? `: ${result.error}` : \"\"}`\n    );\n  }\n","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/providers/volcenginePlanModelDiscovery.ts#L351-L387","documentation":"Guard in fetchVolcPlanModels for plans whose discovery API requires an AccountId: extractAccountId could not find one in the stored console cookie, so the discovery request payload would be incomplete. Indicates the cookie is from a different console session/format or was captured before login completed; re-binding regenerates a cookie that contains the AccountId.","triggerScenarios":"Thrown at src/lib/providers/volcenginePlanModelDiscovery.ts:369 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-bind the plan exporting cookies from a fully logged-in console session so the AccountId cookie is present.","Verify extractAccountId's cookie-name expectations against the current Volcano console cookie layout.","Use an account whose console session exposes the AccountId (some SSO flows may omit it)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}