{"record":{"id":"e49d6b9f382dc8a0","repo":"jlcodes99/cockpit-tools","slug":"not-available","errorCode":"not_available","errorMessage":"${skipped?.reason} || not_available","messagePattern":"(.+?) \\|\\| not_available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/CodexInstanceLaunchProgressModal.tsx","lineNumber":721,"sourceCode":"            retryInstanceId: state.instanceId,\n          },\n    );\n  };\n\n  const addAccountToApiService = async () => {\n    if (!authFailure?.apiOnlyAvailable || !accountId || apiActionBusy) return;\n    setApiActionBusy(true);\n    setActionError(null);\n    try {\n      const result =\n        await codexLocalAccessService.appendCodexLocalAccessAccounts([\n          accountId,\n        ]);\n      if (!result.syncedAccountIds.includes(accountId)) {\n        const skipped = result.skippedAccounts.find(\n          (item) => item.accountId === accountId,\n        );\n        throw new Error(skipped?.reason || \"not_available\");\n      }\n      setState(null);\n      window.dispatchEvent(\n        new CustomEvent(\"app-request-navigate\", {\n          detail: \"codex-api-service\",\n        }),\n      );\n    } catch (error) {\n      setActionError(\n        t(\"codex.switchAuth.apiServiceAddFailed\", {\n          error: String(error).replace(/^Error:\\s*/, \"\"),\n        }),\n      );\n    } finally {\n      setApiActionBusy(false);\n    }\n  };\n","sourceCodeStart":703,"sourceCodeEnd":739,"githubUrl":"https://github.com/jlcodes99/cockpit-tools/blob/1ed8b77992d62ca81fabf744deb0839ad361d5bf/src/components/CodexInstanceLaunchProgressModal.tsx#L703-L739","documentation":"Guard in CodexInstanceLaunchProgressModal.addAccountToApiService: appendCodexLocalAccessAccounts succeeded, but the target accountId is absent from result.syncedAccountIds — the backend skipped it. The skipped entry's reason is used as the error message, defaulting to 'not_available' when no reason is recorded, and the API-service addition is treated as failed.","triggerScenarios":"Thrown at src/components/CodexInstanceLaunchProgressModal.tsx:721 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the backend skip reason for the account (expired/invalid credentials, already synced, locked) and fix the underlying cause","Re-run the API-service addition after repairing the account","Surface the specific reason instead of the 'not_available' default when diagnosing"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1ed8b77992d62ca81fabf744deb0839ad361d5bf","analyzedAt":"2026-09-05T09:51:41.178Z","contentChangedAt":"2026-09-05T09:51:41.178Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}