{"record":{"id":"2fe30fbfeb41328d","repo":"tinyhumansai/openhuman","slug":"core-rejected-the-meet-get-event-policies-request","errorCode":null,"errorMessage":"Core rejected the meet_get_event_policies request.","messagePattern":"Core rejected the meet_get_event_policies request\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/services/meetCallService.ts","lineNumber":457,"sourceCode":"  if (!result?.ok) {\n    throw new Error('Core rejected the meet_set_event_policy request.');\n  }\n}\n\n/**\n * Batch-fetch per-event join-policy overrides for the given calendar event IDs.\n * Only IDs that have an explicit override are present in the returned map.\n */\nexport async function getEventPolicies(\n  calendarEventIds: string[]\n): Promise<Record<string, string>> {\n  if (calendarEventIds.length === 0) return {};\n  const result = await callCoreRpc<CoreGetEventPoliciesResponse>({\n    method: 'openhuman.meet_get_event_policies',\n    params: { calendar_event_ids: calendarEventIds },\n  });\n  if (!result?.ok) {\n    throw new Error('Core rejected the meet_get_event_policies request.');\n  }\n  return result.policies ?? {};\n}\n\nexport async function joinMeetingViaMascotBot(\n  input: MascotJoinMeetingInput\n): Promise<MascotJoinMeetingResult> {\n  const meetUrl = input.meetUrl.trim();\n  if (!meetUrl) {\n    throw { message: 'Please paste a meeting link.', isCapacityGated: false };\n  }\n  try {\n    return await apiClient.post<MascotJoinMeetingResult>('/mascots/join-meeting', {\n      platform: input.platform,\n      meetUrl,\n      displayName: input.displayName?.trim() || undefined,\n    });\n  } catch (err) {","sourceCodeStart":439,"sourceCodeEnd":475,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/app/src/services/meetCallService.ts#L439-L475","documentation":"The batch fetch openhuman.meet_get_event_policies returned ok:false. Note the early return: an empty calendarEventIds array never reaches the wire, so this only fires for non-empty batches the core rejects. The contract is that only explicitly-overridden IDs appear in the returned map — ok:false means the read failed, not 'no overrides exist'.","triggerScenarios":"getEventPolicies([...ids]) when the policy store is unreadable; IDs of a type/format the handler rejects (non-string, empty strings slipping through); calendar disconnected so the store context is unavailable.","commonSituations":"Rendering a list of upcoming events and batch-fetching policies while the workspace store is mid-migration; mixed ID sources (external calendar IDs vs internal IDs); store locked by a concurrent write.","solutions":["Catch and degrade to {} (treated as 'no overrides') so the UI falls back to per-platform/global policy display","Filter/normalize IDs to non-empty strings before batching","Check core logs for the policy-store read error if overrides silently vanish","Retry once — a transient store lock during a concurrent setEventPolicy can surface as ok:false"],"exampleFix":"// before\nconst policies = await getEventPolicies(ids);\n\n// after\nconst policies = await getEventPolicies(ids.filter(id => typeof id === 'string' && id.length > 0));","handlingStrategy":"fallback","validationCode":"function sanitizeIds(ids: string[]): string[] {\n  return ids.filter(id => typeof id === 'string' && id.trim().length > 0);\n}","typeGuard":"function isGetPoliciesRejected(err: unknown): boolean {\n  return err instanceof Error && err.message.includes('meet_get_event_policies');\n}","tryCatchPattern":"try {\n  return await getEventPolicies(sanitizeIds(ids));\n} catch {\n  return {}; // no overrides resolvable → UI falls back to per-platform/global policy\n}","preventionTips":["Filter out empty/non-string IDs before batching","Remember the API already short-circuits [] — don't pre-guard on length","Treat the map as optional metadata; an empty result and a failed read should render identically"],"tags":["meet","policy","rpc","ok-flag","batch-read"],"backgroundTag":"rpc-ok-false-rejection","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}