{"record":{"id":"66ac82566db9498f","repo":"koala73/worldmonitor","slug":"account-changed-while-acknowledging-the-api-plan-l","errorCode":null,"errorMessage":"Account changed while acknowledging the API plan-limit notice. Try again.","messagePattern":"Account changed while acknowledging the API plan-limit notice\\. Try again\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/services/api-plan-limit-notices.ts","lineNumber":57,"sourceCode":"  if (!client || !api) return [];\n  if (!await waitForConvexAuthForUser(userId)) {\n    assertAccountStillCurrent(userId, 'loading API plan-limit notices');\n    throw new Error('Authentication unavailable while loading API plan-limit notices. Try again.');\n  }\n  return settleAccountOperation(\n    userId,\n    'loading API plan-limit notices',\n    () => client.query((api as any).apiPlanLimitNotices.listCurrentForUser, {}),\n  );\n}\n\nexport async function acknowledgePlanLimitNotice(noticeId: string): Promise<void> {\n  const userId = getCurrentClerkUser()?.id;\n  if (!userId) throw new Error('Sign in to acknowledge API plan-limit notices.');\n  const [client, api] = await Promise.all([getConvexClient(), getConvexApi()]);\n  if (!client || !api) throw new Error('Convex unavailable');\n  if (!await waitForConvexAuthForUser(userId)) {\n    throw new Error('Account changed while acknowledging the API plan-limit notice. Try again.');\n  }\n  await settleAccountOperation(\n    userId,\n    'acknowledging the API plan-limit notice',\n    () => client.mutation((api as any).apiPlanLimitNotices.acknowledgeNotice, { noticeId }),\n  );\n}\n","sourceCodeStart":39,"sourceCodeEnd":65,"githubUrl":"https://github.com/koala73/worldmonitor/blob/eeab0a219fce0f02a00603b532dbae9041b934ac/src/services/api-plan-limit-notices.ts#L39-L65","documentation":"UI service error in acknowledgePlanLimitNotice (via assertAccountStillCurrent): the authenticated user changed while the acknowledgment was in flight, so it was aborted rather than acknowledging under the wrong account.","triggerScenarios":"Thrown at src/services/api-plan-limit-notices.ts:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry after the account switch settles","Avoid changing accounts mid-operation"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eeab0a219fce0f02a00603b532dbae9041b934ac","analyzedAt":"2026-08-21T16:51:25.751Z","contentChangedAt":"2026-08-21T16:51:25.751Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}