{"record":{"id":"7155192f9c2e1c71","repo":"koala73/worldmonitor","slug":"sign-in-to-acknowledge-api-plan-limit-notices","errorCode":null,"errorMessage":"Sign in to acknowledge API plan-limit notices.","messagePattern":"Sign in to acknowledge API plan-limit notices\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/services/api-plan-limit-notices.ts","lineNumber":53,"sourceCode":"export async function listCurrentPlanLimitNotices(): Promise<ApiPlanLimitNotice[]> {\n  const userId = getCurrentClerkUser()?.id;\n  if (!userId) return [];\n  const [client, api] = await Promise.all([getConvexClient(), getConvexApi()]);\n  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":35,"sourceCodeEnd":65,"githubUrl":"https://github.com/koala73/worldmonitor/blob/eeab0a219fce0f02a00603b532dbae9041b934ac/src/services/api-plan-limit-notices.ts#L35-L65","documentation":"UI service error in acknowledgePlanLimitNotice: no Clerk user is authenticated, so there is no account to acknowledge the notice against. Precondition guard fired before any Convex mutation.","triggerScenarios":"Thrown at src/services/api-plan-limit-notices.ts:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sign in and retry acknowledging the notice","Wait for the auth session to load if sign-in just completed"],"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-14T05:17:10.506Z"}