{"record":{"id":"4b21cf35649f6604","repo":"koala73/worldmonitor","slug":"convex-unavailable-4b21cf","errorCode":null,"errorMessage":"Convex unavailable","messagePattern":"Convex unavailable","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/services/billing.ts","lineNumber":227,"sourceCode":"\nexport type ProActivationClaimOutcome =\n  | 'claimed'\n  | 'not_eligible'\n  | 'already_presented'\n  | 'already_claimed';\n\n/**\n * Atomically re-check server-side activation state and reserve one markerless\n * presentation across devices.\n */\nexport async function claimProActivationPresentation(\n  activationKey: string,\n  claimNonce: string,\n): Promise<ProActivationClaimOutcome> {\n  const userId = requireSignedInUserId('claim Pro activation');\n  const client = await getConvexClient();\n  const api = await getConvexApi();\n  if (!client || !api) throw new Error('Convex unavailable');\n  await requireCurrentConvexUser(userId, 'claiming Pro activation');\n  const result = await settleAccountOperation(\n    userId,\n    'claiming Pro activation',\n    () => client.mutation(\n      (api as any).payments.billing.claimProActivationPresentation,\n      { activationKey, claimNonce },\n    ),\n  ) as { status: ProActivationClaimOutcome };\n  assertAccountStillCurrent(userId, 'claiming Pro activation');\n  return result.status;\n}\n\n/** Mark a successful markerless claim as visibly presented. */\nexport async function confirmProActivationPresentation(\n  activationKey: string,\n  claimNonce: string,\n): Promise<boolean> {","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/koala73/worldmonitor/blob/9361220cc013571781071f0206e4d80fd14b2f7f/src/services/billing.ts#L209-L245","documentation":"Error thrown by claimProActivationPresentation when the lazily-initialized Convex client or its API module could not be obtained. It is an environment/precondition guard in the browser service: without a working Convex connection the activation claim mutation cannot run, so the call aborts before any server contact.","triggerScenarios":"Thrown at src/services/billing.ts:215 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the Convex deployment URL configuration is present in the app environment","Re-initialize or reload so the lazy Convex client can be constructed","Check for network/offline conditions preventing client bootstrap"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9361220cc013571781071f0206e4d80fd14b2f7f","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}