{"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/a221052e0df5b1f7598fceba7329fd1af95d6699/app/src/services/meetCallService.ts#L439-L475","documentation":"`openhuman.meet_get_event_policies` resolved with `ok` falsy. The function short-circuits an empty id array locally (returns `{}` without RPC), so this throw requires a non-empty batch the core refused. By contract only ids with explicit overrides come back in the map; a missing id is not an error — so ok:false again signals a handler-level failure (store read error) or invalid ids rather than 'nothing found'.","triggerScenarios":"Batch containing malformed calendar_event_id values (empty strings, wrong type); the policy store unreadable; very large batches exceeding a core-side limit.","commonSituations":"UI passing unfiltered ids including blanks or stale rows; workspace store corrupted or partially copied; frontend batching logic changed to send thousands of ids.","solutions":["Filter the id list before calling: drop empty/whitespace values and de-duplicate","Chunk very large batches into smaller calls","Check core logs for the get_event_policies failure","Treat a failed batch as 'no overrides' in the UI (safe default) and surface a warning"],"exampleFix":"// before\nconst policies = await getEventPolicies(eventIds);\n\n// after\nconst ids = [...new Set(eventIds.map(i => i.trim()).filter(Boolean))];\nconst policies = ids.length ? await getEventPolicies(ids) : {};","handlingStrategy":"try-catch","validationCode":"const ids = [...new Set(calendarEventIds.map(i => i?.trim() ?? '').filter(Boolean))];\nif (ids.length === 0) return {}; // matches the service's own empty short-circuit","typeGuard":"function areValidEventIds(ids: unknown[]): ids is string[] {\n  return ids.every(i => typeof i === 'string' && i.trim().length > 0);\n}","tryCatchPattern":"let policies: Record<string, string> = {};\ntry { policies = await getEventPolicies(ids); }\ncatch { policies = {}; } // no overrides shown — safe default","preventionTips":["Trim, de-duplicate, and drop blanks before batching ids","Chunk batches (e.g. 100 ids) so one bad element fails small","Treat a failed fetch as 'no overrides' rather than blocking the calendar view"],"tags":["meet","calendar","core-rpc","batching"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}